FWSd Scripting Module Documentation (SDK) ----------------------------------------- Commandlist (Alphabetically) ------------------------------------------------------------------------------------------------- AdminJoin chan - Makes fwsbot join a valid channel AdminPart chan - Makes fwsbot part a channel he's on - cAddText text - Adds text to the console CD dir/path - Changes directory (necessary?) - ChanClients chanid - Gets the number of clients in chanid ChanOpers chanid - Gets the number of chanops in chanid ChanVoices chanid - Gets the number of chanvoices in chanid - ChanClient chanid, num - Gets the nickname of chanuser num ChanOper chanid, num - Gets the nickname of chanoper num ChanVoice chanid, num - Gets the nickname of chanvoice num - IsChanClient nick, chan - Returns true if nick is a client in a channel chan IsChanOper nick, chan - Returns true if nick is a chanop in a channel chan IsChanVoice nick, chan - Returns true if nick is a chanvoice a channel chan - ChanKey chanid - Returns the channelkey for chanid ChanModes chanid - Returns the channelmodes for chanid ChanTopic chanid - Returns the channeltopic for chanid - ChanName chanid - Returns the channels name Channel channel - Returns chanid for the channelname channel - Client nick - Returns cid (client id) for the nickname nick ClientAlive cid - Returns true if the client is on this IRCd and is alive ClientAliveR cid - Returns true if the client is alive ClientT nick - Returns the P10 token for the nickname nick ClientTk cid - Returns the P10 token for cid - FileAppend file, text - Appends text to file FileOutput file, text - Creates file and writes text to it -- - GetAdmin - Gets the FWSbot's nick (Same as GetNick(0)) GetAddress cid - Returns the nick!user@host for cid GetAddressIP cid - Returns the nick!user@ip for cid GetAppPath - Returns the IRCd's filepath (Server directory) GetHost cid - Gets the @host for cid GetLocalInfo cid - Gets the p1, p2 sent by the client: USER user p1 p2 :realname SetOper cid, usermodes - Gives cid usermodes, and sends the appropriate numerics - - usermodes should at least be "ows" GetModes cid - Returns cid's usermodes GetNick cid - Returns cid's nickname GetNow - Returns the current date and time GetRealname cid - Returns cid's realname GetRealUser cid - The real username of cid (from USER user x y :realname) GetServerName sid - Returns this servers name GetUser cid - Returns cid's current !user@ IsAdmin cid - Returns true if cid is a Server Administrator IsOper cid - Returns true if cid is an IRC operator IsLike a, b - Returns true if a is Like b (f.ex server.com is like *.com) - Kick kid, chan, cid, r - cid will KICK kid from channel chan with reason r Mode cid, target, params - cid MODE target params (f.ex 0, "#chan", "+o nick") - pOpenServer - Opens all ports pCloseServer - Closes all ports - SKick chan, cid, reason - Kick cid from chan with reason, using the server SMode target, params - Server sets mode on target: params - rNoSuchChan cid, chan - Send the no such channel numeric to cid rNoSuchClient cid, chan - Send the no such client numeric to cid rNotIRCOP cid, chan - Send the permission denied (youre not ircop) numeric to cid RouteServer srvid, text - Finds a route to srvid and sends text SendRAW cid, text - Sends text to cid SendServer srvid, text - Sends text to srvid if possible SendServers text - Sends text to all servers SendToChan chid, text - Sends text to all clients in chanid ServerDie text - Makes IRCd die with the reason text ServerRestart text - Makes IRCd restart with the reason text SetClientMode cid, mode - Adds usermode mode to client cid SetNick cid, newnick - Forces cid to change nick to newnick, returns true if successfull SetUser cid, newuser - Change cid's user to newuser SetHost cid, newhost - Change cid's host to newhost SrvNamed text - Returns srvid for server named text, if any, else returns -1 - ToDbl value - Converts string to a double value (use on for example CPS) - -- NewCollection Use: Set x = NewCollection Desc: String collection - x.Add value, (optional index = 0) - Adds a value to the collection x.Clear - Clears the collection x.Count - Collection count x.Remove index - Removes index from collection x.SetValue index, newvalue - Index gets new value x.ValueAdd value - If value doesnt already exist it is added, returns index x.ValueGet value - If value exists this returns the index x.ValueRem value - If value exists its removed, returns index x.ValueLike valuematch - The first value like valuematch is returned, returns index - FileRead filename - Reads all lines in filename to string collection Use: Set x = FileRead("filename") Desc: Reads all lines from a file to the string collection x - -- The IRCd's internal variables are valuable for setting variables that should be preserved, and not forgotten with a REHASH. The same variables are set in the config file, and feel free to add you own variables, even just for one script, it also means that all scripts have access to the variable. -- SetValue var, value - Sets the variable's value GetValue var - Gets the value of var vGetInt var - Gets the numeric value of a var -- - Notice all, notice - Sends a local notice to either everyone (all) or ircops GNotice all, notice - Sends a global notice to either everyone (all) or ircops - TotalClients - Returns the number of clients alive on the network UbClients - Returns the upper boundary for the client array UbChans - Returns the upper boundary for the channel array - Last updated: 03.07.05