incubus.dll
inc_dll3.zip: The dll and dll.txt. Additions since last version: Added -delkey and -delsection switches to the [ini] function. Fixed the docs for the shellexecute function. Source zip now includes the right docs.
incdllsrc.zip: The Visual C++ 5.0 project files and source for this dll.
If you're a hardcore scripter for XiRCON, this dll may be for you. It adds the following functions to XiRCON's scripting language:
strlen <string>
Returns length of <String>.
strcmp <string1> <string2>
Case-sensitive string compare. Returns 0 for match.
strncmp <string1> <string2> <length>
Case-sensitive string compare with length limit.
stricmp <string1> <string2>
Non-case-sensitive string compare.
strnicmp <string1> <string2> <length>
Non-case-sensitive string compare with length limit.
match <pattern> <string>
Non-case-sensitive wildcard match routine from ircd. Returns 1 for match and 0 for no match.
get_token <varname> <token separator(s)>
Returns first token contained in <varname>. The token is also removed from from the original string and the remaining string is stored in <varname>.
get_token2 <varname> <string> <token separator(s)>
Same as get_token except it reads <string> instead of <varname> to get the initial working string.
Userlist/Botlist Functions:
readusers <filename>
Read user information. Returns 0 if users have already been read, 1 if read is successful, and -1 if <filename> cannot be opened.
writeusers <filename>
Read user information. Returns 0 if users haven't been read yet, 1 if write is successful, and -1 if <filename> could not be opened.
adduser <network> <mask> <flags>
Add a user to the userlist. If an entry with the same mask and network already exists, its flags are set to <flags>.
addbot <network> <mask> <flags> <passwd>
Add a bot to the userlist. If an entry with the same mask and network already exists, its flags and/or password are changed to match <flags> and <passwd>.
clear_users
Clears user and bot lists.
users_loaded
Returns 1 if users and bots have been read from a file else 0.
isbot <network> <mask>
Search bot database for <mask>. Returns 0 if not found else returns the bot's flags.
isuser <network> <mask>
Search user database for <mask>. Returns 0 if not found else returns the user's flags.
getpass <network> <botmask>
Returns the password for <botmask>, else returns "".
userindex <network> <index>
Returns the mask of the N'th user with a network field that matches <network>. <network> can be a mask. Indexes start at 0.
botindex <network> <index>
Returns the mask of the N'th bot with a network field that matches <network>. <network> can be a mask. Indexes start at 0.
totalusers <network>
Returns the number of users with a network field that matches <network>. <network> can be a pattern.
totalbots <network>
Returns the number of bots with a network field that matches <network>. <network> can be a pattern.
deluser <network> <mask>
Deletes a user. Wildcards are not permitted. Returns 1 for success or 0 for failure.
delbot <network> <mask>
Deletes a bot. Wildcards are not permitted. Returns 1 for success and 0 for failure.
get_userlist <network> <mask>
Returns a TCL list containing the network, mask, and flags of all users that match <mask> (wildcards ok).
get_botlist <network> <mask>
Returns a TCL list containing the network, mask, flags, and passwords of all bots that match <mask> (wildcards ok).
Serverlist Functions:
readservers <filename>
Reads server info from <filename>. This will read mIRC server.ini's.
clear_servers
Clears out any loaded server info.
get_servertype <server name> <port>
Returns the network type if any for the specified server and port (ie. "efnet", "undernet", etc)
Internal Address List Functions:
ial_add <nick> <user@host> <channel>
If there is not IAL info stored for <nick> yet, a new entry is added, otherwise, <channel> is added to <nick>'s channel list.
ial_removechannel <channel>
Removes <channel> from all entries in the IAL.
ial_removenickchannel <nick> <channel>
Removes <channel> from <nick>'s IAL entry. If there are no channels left afterwards, the user is removed.
ial_removenick <nick>
Removes the IAL info for <nick>.
ial_changenick <oldnick> <newnick>
Changes the nick of an existing IAL entry.
ial_clear
Clears the IAL. NOTE: This MUST be called in the "on unload" event otherwise a memory leak will occur. It is also recommended that this be called in the "on disconnect" event.
ial_userhost <nick>
Returns the user@host info for <nick> else returns "".
ial_userchannels <nick>
Returns a TCL list of all channels <nick> is on.
ial_nicks
Returns a TCL list of all nicks in the IAL.
address <nick>
Returns the nick!user@host stored for <nick> else "" is returned.
ison <nick> <channel>
Returns 1 if <nick> is on <channel> else 0.
Utility Functions:
idle2str seconds
Returns amount of time in weeks, days, hours, minutes, and seconds.
iptolong IP address
Given an IP address, iptolong returns the long IP.
longtoip Long IP
Given a long IP, longtoip returns the IP address.
ini -read <inifile> <section> <key> <default value>
ini -write <inifile> <section> <key> <string>
ini -delkey <inifile> <section> <key>
ini -delsection <inifile> <section>
If -read is used, returns data from ini file. If -write is used, writes data to ini file and returns 0 on success, system error msg on failure. If -delkey is used, the specified key value is deleted. If -delsection is used, the entire section specified is deleted.
file_open [-m] <Title> <defaultDir> <filter>
Opens a standard file open dialog box and returns the filename selected by the user or "" if canceled.
shellexecute <Program/File> [-args Arguments] [-workdir Working Directory] [-showtype ShowType] [&]
Executes the program or launches the file's associated program. If "&" is specified as one of the arguments, the program will be run independant of XiRCON, otherwise, XiRCON will wait for the program to finish before continuing.
State Values: (Straight from the Visual C++ help)
HIDE Hides the window and activates another window.
MAXIMIZE Maximizes the specified window.
MINIMIZE Minimizes the specified window and activates the next top-level window in the z-order.
RESTORE Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when restoring a minimized window.
SHOW: Activates the window and displays it in its current size and position.
SHOWDEFAULT: Sets the show state based on the SW_ flag specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application. An application should call ShowWindow with this flag to set the initial show state of its main window.
SHOWMAXIMIZED: Activates the window and displays it as a maximized window.
SHOWMINIMIZED: Activates the window and displays it as a minimized window.
SHOWMINNOACTIVE: Displays the window as a minimized window. The active window remains active.
SHOWNA: Displays the window in its current state. The active window remains active.
SHOWNOACTIVATE: Displays a window in its most recent size and position. The active window remains active.
SHOWNORMAL: Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time.