void _init(void) { registercontrolhelpcmd("patroljoin", NO_OPER, 1, &pc_cmd_patroljoin, "Usage: patroljoin <channel>\nJoins a patrol client to a channel."); registercontrolhelpcmd("patrolpart", NO_OPER, 1, &pc_cmd_patrolpart, "Usage: patrolpart <#id>\nRemoves a patrol client from a channel."); registercontrolhelpcmd("patrollist", NO_OPER, 0, &pc_cmd_patrollist, "Usage: patrollist\nLists patrol channels."); schedulerecurring(time(NULL) + 5, 0, 10, &pc_sched_check, NULL); }
void lua_startcontrol(void) { registercontrolhelpcmd("inslua", NO_DEVELOPER, 1, &lua_inslua, "Usage: inslua <script>\nLoads the supplied Lua script.."); registercontrolhelpcmd("rmlua", NO_DEVELOPER, 1, &lua_rmlua, "Usage: rmlua <script>\nUnloads the supplied Lua script."); registercontrolhelpcmd("reloadlua", NO_DEVELOPER, 1, &lua_reloadlua, "Usage: reloadlua <script>\nReloads the supplied Lua script."); registercontrolhelpcmd("lslua", NO_DEVELOPER, 0, &lua_lslua, "Usage: lslua\nLists all currently loaded Lua scripts and shows their memory usage."); registercontrolhelpcmd("forcegc", NO_DEVELOPER, 1, &lua_forcegc, "Usage: forcegc ?script?\nForces a full garbage collection for a specific script (if supplied), all scripts otherwise."); registerhook(HOOK_CORE_STATSREQUEST, lua_controlstatus); }
static void registercommands(int hooknum, void *arg) { if(commandsregistered) return; commandsregistered = 1; registercontrolhelpcmd("trustlist", NO_OPER, 2, trusts_cmdtrustlist, "Usage: trustlist [-v] <#id|name|IP|&qid>\nShows trust data for the specified trust group."); registercontrolhelpcmd("trustlistrelay", NO_RELAY, 2, trusts_cmdtrustlist, "Same as trustlist, but for the relay."); registercontrolhelpcmd("trustglinesuggest", NO_OPER, 1, trusts_cmdtrustglinesuggest, "Usage: trustglinesuggest <user@host>\nSuggests glines for the specified hostmask."); registercontrolhelpcmd("trustspew", NO_OPER, 1, trusts_cmdtrustspew, "Usage: trustspew <#id|name>\nShows currently connected users for the specified trust group."); }
void _init() { if (!fakeuser_loaddb()) { Error("fakeuser", ERR_FATAL, "Cannot load database"); return; } registercontrolhelpcmd("fakeuser", NO_OPER, 4, &fakeadd, "Usage: FAKEUSER nick <ident> <host> <realname>\nCreates a fake user."); registercontrolhelpcmd("fakelist", NO_OPER, 0, &fakelist, "Usage: FAKELIST\nLists all fake users."); registercontrolhelpcmd("fakekill", NO_OPER, 2, &fakekill, "Usage: FAKEKILL nick\nRemoves a fake user"); }
void _init(void) { registercontrolhelpcmd("splitlist", NO_STAFF, 0, &spcmd_splitlist, "Usage: splitlist\nLists servers currently split from the network."); registercontrolcmd("splitdel", 10, 1, &spcmd_splitdel); registercontrolhelpcmd("splitadd", 10, 3, &spcmd_splitadd, "Usage: splitadd <servername> [+flags] [split time as unix timestamp]\n" " Adds a server as split from the network.\n" " Flags:\n" " +c: Client server\n" " +h: Hub server\n" " +s: Service\n" " +Q: Q/CServe\n" " +S: S/spamscan\n" " +X: Other critical service\n" " If no flags are given, an attempt to figure them out based on name\n" " will be made, but it's likely not a good one."); }
void relayfinishinit(int hooknum, void *arg) { sstring *s; deregisterhook(HOOK_CHANSERV_DBLOADED, relayfinishinit); registercontrolhelpcmd("checkhashpass", NO_RELAY, 3, csa_docheckhashpass, "Usage: checkhashpass <username> <digest> ?junk?"); registercontrolhelpcmd("settempemail", NO_RELAY, 2, csa_dosettempemail, "Usage: settempemail <userid> <email address>"); registercontrolhelpcmd("setemail", NO_RELAY, 3, csa_dosetemail, "Usage: setmail <userid> <timestamp> <email address>"); registercontrolhelpcmd("resendemail", NO_RELAY, 1, csa_doresendemail, "Usage: resendemail <userid>"); registercontrolhelpcmd("activateuser", NO_RELAY, 1, csa_doactivateuser, "Usage: activateuser <userid>"); registercontrolhelpcmd("addchan", NO_RELAY, 3, csa_doaddchan, "Usage: addchan <channel> <userid> <channel type>"); s=getcopyconfigitem("chanserv","createaccountsecret","",128); if(!s || !s->content || !s->content[0]) { Error("chanserv_relay",ERR_WARNING,"createaccountsecret not set, createaccount disabled."); } else if(s->length != KEY_BITS / 8 * 2 || !hex_to_int(s->content, createaccountsecret, sizeof(createaccountsecret))) { Error("chanserv_relay",ERR_WARNING,"createaccountsecret must be a %d character hex string.", KEY_BITS / 8 * 2); } else { registercontrolhelpcmd("createaccount", NO_RELAY, 5, csa_docreateaccount, "Usage: createaccount <execute> <username> <email address> <encrypted password> <activate user>"); createaccountsecret_ok = 1; } freesstring(s); }
void _init() { registercontrolhelpcmd("fsck",NO_DEVELOPER,0,dofsck, "Usage: fsck\nRuns internal structure check."); }
void _init(void) { registercontrolhelpcmd("addjupe", NO_OPER, 3, ju_addjupe, "Usage: addjupe <servername> <duration> <reason>"); registercontrolhelpcmd("activatejupe", NO_OPER, 1, ju_activatejupe, "Usage: activatejupe <servername>"); registercontrolhelpcmd("deactivatejupe", NO_OPER, 1, ju_deactivatejupe, "Usage: deactivatejupe <servername>"); registercontrolhelpcmd("jupelist", NO_OPER, 0, ju_jupelist, "Usage: jupelist"); }
void _init() { settime_schedule = schedulerecurring(time(NULL) + 300, 0, 1800, &settime_sendsettime, NULL); registercontrolhelpcmd("settime",NO_DEVELOPER,0,&settime_cmd,"Usage: settime\nForce send a settime to network."); }
void _init() { registercontrolhelpcmd("carrot",NO_OPERED,2,ca_carrot,"Usage: carrot <#channel|user> ?user?"); }