VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



VBBot Fully Scriptable VBScript IRC Bot with a VB Engine

by Elan Hasson (2 Submissions)
Category: Complete Applications
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

VBBot is a 100% Scriptable IRC Bot with a Main Engine written in Visual Basic. VBBot can be scripted using ANY language supported by your system's Windows Scripting Host (Perl, Python, VBScript, JScript,etc..). I've written support for a socket collection within the scripting, where you can create connections and access Events of the socket, such as OnClose,OnOpen,OnConnect,OnDataArrival. The bot will currently connect to EFNet irc (www.efnet.org) and join #Compiled.org. It also has DCC Chat capabilities (100% scripted) that includes a party line so bot users can chat.
He can also re-load his scripting code via IRC with a ".rehash" command wich can be given via DCC Chat. This will be done without breaking ANY of the connections the bot has (server/dcc/etc).
VBBot also demonstrates Events in VBScript. Each event from the IRCServer is processed by functions in the VBScript files. There are several objects exposed from the VBEngine to the Script files. They are:
Object Name - TypeLib - Description
Sockets - Inis5.ivTCP - Socket Library exposed to the script for use by the script for making DCC connections/misc..
Bot - MSScriptControl.ScriptControl - The actual Scripting engine, exposed to the script for capabilities such as adding scripts of another language to an already exsisting script.
List - VBBot.IAL - Access to the Internal Address List
Server - Inis5.ivTCP - The Socket from the VBEngine that connects to the IRC Server.
Identd - Inis5.ivIdentd - The identD server from the VBEngine

This example demonstrates use of RFC1459 (IRC Protocol), How to Add scripting abilities to your application, Use of Collections, String Parsing.
This example also includes a Fully Function Internal Address List. The internal address list is a collection of all the users in ALL of the channels the bot is currently in. The data stored is the user's hostname,ident,username,hostmask,channels they are in that the bot is also in. Also has a space for thier status (op/voice/none). The IAL can reference a user by either the IAL Index (a unique number of it in the IAL List) or by the user's Hostname (user!ident@host).
This code is poorly commented, for the reason i don't like comments. However it is easy to follow if you somewhat know what you are doing. Before running, copy all the DLL's and OCX's to your system directory (c:\windows\system or c:\winnt\system32) and register them using regsvr32 .
then open up your ms-dos prompt from windows and cd to the bot's directory and type:
vbbot.exe bot.vbs
VBBot.exe and ALL the other .vbs files MUST be in the same directory for the sake of this example.
Please check out my website at https://www.compiled.org

Rate VBBot Fully Scriptable VBScript IRC Bot with a VB Engine

Upload

Download this snippet    Add to My Saved Code

VBBot Fully Scriptable VBScript IRC Bot with a VB Engine Comments

No comments have been posted about VBBot Fully Scriptable VBScript IRC Bot with a VB Engine. Why not be the first to post a comment about VBBot Fully Scriptable VBScript IRC Bot with a VB Engine.

Post your comment

Subject:
Message:
0/1000 characters