/* msgtab.h * (C) Peter Salanki 2004 * This program is copyright, and covered by the Gnu Public License. * The Natasha bot. * sorcer@linux.se */ /* * Global authlevels as follows: * 0: Just everyone not logged in * 1: Normal user * 2: Service Friend * 3-6: Reserved for future stuff * 7: Helper * 8: Queue worker * 9-19: Reserved for future stuff * 20: tech-guy * 21: Master tech-guy * 22: IRC Operator * 23-29: Reserved for future stuff * 30: Borrowable arm * 31: Free * 32: Free * 33: Free * 34: Free * 35: Free * 36: Private or not borrowable arm. * 37: Free * 39: Free * 40: Checker service. * 41-50: Reserved for future special services */ #ifdef DEBUG void m_raw (char *a, struct arm *arm); void m_globalraw (char *a, struct arm *arm); #endif #ifndef Q_AUTOAUTH void m_hello (char *a, struct arm *arm); void m_auth (char *a, struct arm *arm); void m_newpass (char *a, struct arm *arm); #else void m_ident (char *a, struct arm *arm); void m_active (char *a, struct arm *arm); void m_inactive (char *a, struct arm *arm); void m_sync (char *a, struct arm *arm); void m_syncmanychans (char *a, struct arm *arm); #endif void m_VCP_notify (char *a, struct arm *arm); void m_VCP_strike (char *a, struct arm *arm); void m_email (char *a, struct arm *arm); void m_showcommands (char *a, struct arm *arm); void m_help (char *a, struct arm *arm); void m_whoami (char *a, struct arm *arm); void m_whois (char *a, struct arm *arm); void m_join (char *a, struct arm *arm); void m_part (char *a, struct arm *arm); void m_cycle (char *a, struct arm *arm); void m_clearaccess (char *a, struct arm *arm); void m_listachanusers (char *a, struct arm *arm); #ifdef MODULE_puffnotes void m_addnote (char *a, struct arm *arm); void m_listnotes (char *a, struct arm *arm); #endif #ifdef Q void m_requestop (char *a, struct arm *arm); #ifdef L void m_lclean (char *a, struct arm *arm); #endif #endif void m_move (char *a, struct arm *arm); void m_quit (char *a, struct arm *arm); void m_rehash (char *a, struct arm *arm); void m_status (char *a, struct arm *arm); void m_armstatus (char *a, struct arm *arm); void m_gban (char *a, struct arm *arm); void m_ban (char *a, struct arm *arm); void m_unban (char *a, struct arm *arm); void m_access (char *a, struct arm *arm); void m_chanset (char *a, struct arm *arm); void m_userlev (char *a, struct arm *arm); void m_greet (char *a, struct arm *arm); void m_op (char *a, struct arm *arm); void m_voice (char *a, struct arm *arm); void m_invite (char *a, struct arm *arm); void m_deop (char *a, struct arm *arm); void m_devoice (char *a, struct arm *arm); void m_devoiceall (char *a, struct arm *arm); void m_kick (char *a, struct arm *arm); void m_say (char *a, struct arm *arm); void m_staffmsg (char *a, struct arm *arm); void m_staffnotice (char *a, struct arm *arm); void m_allsay (char *a, struct arm *arm); void m_flushlog (char *a, struct arm *arm); void m_broadcast (char *a, struct arm *arm); void m_bbroadcast (char *a, struct arm *arm); void m_listauth (char *a, struct arm *arm); void m_badchan (char *a, struct arm *arm); void m_regexbadchan (char *a, struct arm *arm); void m_unbadchan (char *a, struct arm *arm); void m_suspend (char *a, struct arm *arm); void m_unsuspend (char *a, struct arm *arm); void m_reloadmod (char *a, struct arm *arm); void m_loadmod (char *a, struct arm *arm); void m_unloadmod (char *a, struct arm *arm); void m_modstats (char *a, struct arm *arm); #ifndef Q_AUTOAUTH void m_oper (char *a, struct arm *arm); #endif void m_accept (char *a, struct arm *arm); void m_addarm (char *a, struct arm *arm); void m_delarm (char *a, struct arm *arm); void m_armmode (char *a, struct arm *arm); #ifdef OUTGOING_VHOST void m_vhost (char *a, struct arm *arm); #endif void m_connectarms (char *a, struct arm *arm); void m_syncarm (char *a, struct arm *arm); void m_htm (char *a, struct arm *arm); void m_autohtm (char *a, struct arm *arm); void m_version (char *a, struct arm *arm); #ifdef VAL void m_ja (char *a, struct arm *arm); void m_nej (char *a, struct arm *arm); void m_blank (char *a, struct arm *arm); #endif struct MsgtabEntry { char *msg; void (*func) (char *a, struct arm *arm); char *summary; char *help; int level; }; struct MsgtabEntry msgtab[] = { #ifdef DEBUG {"RAW", m_raw, "Sends a raw string to the server the ARM is connected to.", "/msg %s RAW \nThis will send to the server the ARM is connected to.\n", MASTER_TECHNICIAN}, {"GLOBALRAW", m_globalraw, "Sends a raw string to the servers all ARMs are connected to.", "/msg %s RAW \nThis will send to the servers the ARMs are connected to.\n", MASTER_TECHNICIAN}, #endif {"OP", m_op, "Gives someone +o on a channel.", "/msg %s OP \nThis sets mode +o on - You must have chanop or higher on that channel.\n", NORMAL}, {"VOICE", m_voice, "Gives someone +v on a channel.", "/msg %s VOICE \nGives +v (voice) on a channel. You must have chanop or higher on that channel.\n", NORMAL}, {"DEOP", m_deop, "Removes someone's op on a channel.", "/msg %s DEOP \nRemoves op on on - You must have chanop or higher on that channel.\n", NORMAL}, {"DEVOICE", m_devoice, "Removes someone's voice on a channel.", "/msg %s DEVOICE \nRemoves voice on on a . You must have chanop or higher on that channel.\n", NORMAL}, {"DEVOICEALL", m_devoiceall, "Devoices everyone in a channel that doesen't have voice flag in the bot.", "/msg %s DEVOICEALL \n", TECHNICIAN}, {"INVITE", m_invite, "Invites you to a channel.", "/msg %s INVITE \nInvites you to a channel that is +i. You need to have friend or higher access on that channel.\n", NORMAL}, {"KICK", m_kick, "Kicks someone from a channel.", "/msg %s KICK \nKicks from . You must have chanop or higher on that channel.\n", NORMAL}, {"SAY", m_say, "Makes the bot say something.", "/msg %s SAY \n", NORMAL}, {"STAFFMSG", m_staffmsg, "Opens a query with the message to every staff member that hits the mask.", "/msg %s STAFFMSG \nMask is i.e <7 (all staff members with access lower than level 7), >8 (all staff members with access higher than level 8)", HELPER}, {"STAFFNOTICE", m_staffnotice, "Sends a notice with the message to every staff member that hits the mask.", "/msg %s STAFFNOTICE \nMask is i.e <7 (all staff members with access lower than level 7), =8 (all staff members with level 8)", HELPER}, {"ALLSAY", m_allsay, "Makes all the arms in the service to msg the target.", "/msg %s ALLSAY \n", MASTER_TECHNICIAN}, {"BROADCAST", m_broadcast, "Broadcast a message to all channels the service is on.", "/msg %s BROADCAST \n", TECHNICIAN}, {"ABROADCAST", m_bbroadcast, "Broadcast a message to all channels the arm is on.", "/msg %s BBROADCAST \n", TECHNICIAN}, {"FLUSHLOG", m_flushlog, "Flushes the logs in memory to database.", "/msg %s FLUSHLOG\n", TECHNICIAN}, {"BAN", m_ban, "Bans someone on a channel.", "/msg %s BAN / [duration] [reason]\nThis will ban someone on a channel, i.e: \"BAN #channel nick 10m U suck\" or \"BAN #channel user@host\" Default ban time is 1 hour. - You must have chanop or higher on that channel.\n", NORMAL}, {"GLOBALBAN", m_gban, "Places a ban over the entire service/servicenet.", "/msg %s GLOBALBAN / \nThis will ban someone globally, i.e: \"GLOBALBAN nick 10m Flooding massively\"\n", MASTER_TECHNICIAN}, {"UNBAN", m_unban, "Unbans someone on a channel.", "/msg %s UNBAN /\nThis will unban someone on a channel, i.e: \"UNBAN #channel nick\" or \"UNBAN #channel user@host\" - You must have chanop or higher on that channel.\n", NORMAL}, #ifndef Q_AUTOAUTH {"HELLO", m_hello, "Creates a new user on the bot.", "/msg %s HELLO\nCreates a new user for you on the bot. Note that there are *NO HOSTMASKS* on this bot. Other bots allow you to ident if you just know the password, so this one just uses the password and scraps the hostmask as pointless.\n", UNAUTHED}, {"AUTH", m_auth, "Identifies you as a particular user on the bot.", "/msg %s AUTH \nThis will identify you on the bot as until you next quit from IRC or time out.\n", UNAUTHED}, #else {"IDENT", m_ident, "Identifies you as a particular user on the bot (useful i.e if you have authed with Q after joining).", "/msg %s IDENT\n Checks your auth status again.\n", UNAUTHED}, // {"ACTIVE", m_active, "Makes you an active staff member.", "/msg %s ACTIVE\n Sets your correct staff access level. Only to be used by " BOTHOUSE " staff.\n", NORMAL}, // {"INACTIVE", m_inactive, "Makes you an inactive staff member.", "/msg %s INACTIVE\n Sets your access levels to normal user.\n", HELPER}, {"SYNC", m_sync, "Syncs the AUTH status of every un-AUTH'd user on a chan.", "/msg %s SYNC \nSyncs the AUTH status of every un-AUTH'd user on a chan. Not recommended on large channels.\n", HELPER}, {"SYNCMANYCHANS", m_syncmanychans, "Does a sync on a number of channels.", "/msg %s SYNC \nSyncs the AUTH status on startinf from . Last channel is returned.\n", TECHNICIAN}, #endif {"VCP_NOTIFY", m_VCP_notify, "Notify channels that have bot de-oped that they are violating the BotHouse rules.", "/msg %s VCP_NOTIFY\nNotifies channels that have bot de-oped that they are violating the BotHouse rules.\n", HELPER}, {"VCP_STRIKE", m_VCP_strike, "Part channels that have bot de-oped.", "/msg %s VCP_STRIKE\nParts channels that have bot de-oped.\n", MASTER_TECHNICIAN}, {"SHOWCOMMANDS", m_showcommands, "Lists all the commands on the bot.", "/msg %s SHOWCOMMANDS\nLists the commands available on the bot and the level of access required for each. This won't list commands above your level.\n", UNAUTHED}, {"HELP", m_help, "Gives full help on a particular bot command.", "/msg %s HELP \nGives the full help (like this!) instead of the short help for a particular bot command.\n", UNAUTHED}, {"JOIN", m_join, "Makes the bot join a channel.", "/msg %s JOIN \n", TECHNICIAN}, {"PART", m_part, "Makes the bot leave a channel.", "/msg %s PART \n", HELPER}, {"CLEARACCESS", m_clearaccess, "Clear a channels access list.", "/msg %s CLEARACCESS \nRemove all channel users from a channel\n", HELPER}, {"CYCLE", m_cycle, "Makes the bot part and then instantly join the channel.", "/msg %s CYCLE \nYou need to be a helper or owner on the channel.\nThis function is good on desyncs caused by netsplits and such.\n", NORMAL}, {"LISTCHANUSERS", m_listachanusers, "Lists all active channel users on a channel.", "/msg %s LISTCHANUSERS \n", HELPER}, #ifdef MODULE_puffnotes {"ADDNOTE", m_addnote, "Adds a reminder for a specific date and time.", "/msg %s ADDNOTE \nThe bot will remind you at . The date should be in format yy-mm-dd hh:mm.\nExample: ADDNOTE 2003-08-18 11:40 Your favourite TV-Show starts now.\n", NORMAL}, {"LISTNOTES", m_listnotes, "Lists all reminders.", "/msg %s LISTNOTES\nThe bot will list all reminders that you have added.\n", NORMAL}, #endif #ifdef Q {"REQUESTOP", m_requestop, "This will search the service for opless channels and request op from O when one is found.", "/msg %s REQUESTOP\nYou must be a helper.", HELPER}, #ifdef L {"LCLEAN", m_lclean, "This will clean the L access levels that are no longer in use.", "/msg %s LCLEAN\nDoes a whoami in L and checks and removes inactive chanlevs.", HELPER}, #endif #endif {"MOVE", m_move, "Move the bot from a channel to another.", "/msg %s MOVE \nYou must be a helper.", HELPER}, {"REHASH", m_rehash, "Reloads the bot's config.", "/msg %s rehash\n", MASTER_TECHNICIAN}, {"LISTAUTH", m_listauth, "List all AUTH'd staff members.", "/msg %s LISTAUTH\n", HELPER}, {"BADCHAN", m_badchan, "Ban a channel, so it is not requestable.", "/msg %s BADCHAN \n", TECHNICIAN}, {"REGEXBADCHAN", m_regexbadchan, "Ban a channel, so it is not requestable. Using regular expressions.", "/msg %s REGEXBADCHAN \n", TECHNICIAN}, {"UNBADCHAN", m_unbadchan, "Remove badchan for a regex, so it is requestable.", "/msg %s UNBADCHAN \n", TECHNICIAN}, {"SUSPEND", m_suspend, "Suspend a channel.", "/msg %s SUSPEND \nThis will suspend the channel for . If the channel hasn't been unsuspended before has expired, the channel will automatically be parted.\nNatasha will send an E-Mail to all channel owners aswell.", HELPER}, {"UNSUSPEND", m_unsuspend, "Unsuspend a channel.", "/msg %s UNSUSPEND \nThis will unsuspend a channel and make the bot join again.", HELPER}, {"RELOADMOD", m_reloadmod, "Reloads a module.", "/msg %s RELOADMOD \nReload a module\n", MASTER_TECHNICIAN}, {"LOADMOD", m_loadmod, "Loads a module.", "/msg %s LOADMOD \n", MASTER_TECHNICIAN}, {"UNLOADMOD", m_unloadmod, "Unloads a module.", "/msg %s UNLOADMOD \n", MASTER_TECHNICIAN}, {"MODSTATS", m_modstats, "Shows module status.", "/msg %s MODSTATS\n", HELPER}, #ifndef Q_AUTOAUTH {"OPER", m_oper, "Identify you as an IRC Operator.", "/msg %s OPER\n", UNAUTHED}, #endif {"ACCEPT", m_accept, "Accepts request from your nick.", "/msg %s ACCEPT will make you able to request a bot for a channel.\n", NORMAL}, {"STATUS", m_status, "Shows some status for the service.", "/msg %s STATUS\n", HELPER}, {"ARMSTATUS", m_armstatus, "Shows some status for the ARM that is messaged.", "/msg %s ARMSTATUS\n", HELPER}, {"QUIT", m_quit, "Makes the service quit", "/msg %s QUIT \n", MASTER_TECHNICIAN}, {"WHOAMI", m_whoami, "Gives the bot's opinion on who you are.", "/msg %s WHOAMI\nThe bot should tell you your current global auth level and may give other info too.\n", UNAUTHED}, {"ACCESS", m_access, "Tells anyones level on a channel", "/msg %s ACCESS \n", NORMAL}, {"GREET", m_greet, "Set someones greet on a channel.", "/msg %s GREET \nYou need to be channel master or higher to be able to use this comand.\n", NORMAL}, {"CHANSET", m_chanset, "Changes channel settings", "/msg %s CHANSET <+/-> [value]\n+ activates a mode and if necessary sets a value. - disables the mode.\nModes available are:\nmodes = IRC channel modes in .\nkey = IRC channel key in .\nautoop/autovoice = sets automatic op/voice.\nbitch = bitch mode.\nonjoin = set channel welcome message to . %%n is replaced with the joiners nickname. %%p is replaced with the channel peak.\ntopic = Keeps topic until master/owner changes it.\nmassvoice = if someones name matches REGEX he/she will be given voice (if you set * everyone will get voice).\nadvertise = enable/disable anti-advertising.\nflood = anti-spam, syntax: repeats:time i.e 4:6 means that over 4 repeats in 6 seconds the user will be kickbanned for 5 minutes.\npeak = sets peak notification and the !peak public command.\ngreet = If + all users with a greeting message set for your channel will be greeted.\ntv = sets the !tv public command. Shows what is currently on Swedish TV.\nvote = sets the public command !vote. To be able to vote in a channel.\nquotes = enables !quote command to list or add quotes.\ninfobot = sets infobot mode. Public commands like: ++ -- ?? (Not Yet Done).\nstats = enable/disable stats and logging om this channel (most people want this). The stats and log addresses will be showed if someone types stats? or logs? in the channel.\n", NORMAL}, {"USERLEV", m_userlev, "Sets someones level on a channel.", "/msg %s USERLEV \nOnly ops or higher can set voice, only master or higher can set op only owner can set master.\nLevels are:\nNo = No access\nFriend = Protection from autokicks/bans\nVoice = Automatic voice\nOp = Automatic op\nMaster = Master\nOwner = Owner, highest level", NORMAL}, {"CHANLEV", m_userlev, "Sets someones level on a channel (alias to USERLEV).", "See HELP USERLEV.\n", NORMAL}, #ifndef Q_AUTOAUTH {"NEWPASS", m_newpass, "Changes your password", "/msg %s NEWPASS \nYour E-Mail will only be used for channel suspend/revoke issues, and is totally confidential.", NORMAL}, {"WHOIS", m_whois, "Tells you who someone really is.", "/msg %s WHOIS \nTells you what name a user has AUTHed under, if it's not the same as their nick.\n", NORMAL}, {"ADDARM", m_addarm, "Launch a new ARM", "/msg %s ADDARM \n", MASTER_TECHNICIAN}, {"DELARM", m_delarm, "Disconnects and deletes an ARM", "/msg %s DELARM \n", MASTER_TECHNICIAN}, {"ARMMODE", m_armmode, "Changes the suspend status of an ARM.", "/msg %s ARMMODE \n", MASTER_TECHNICIAN}, #ifdef OUTGOING_VHOST {"VHOST", m_vhost, "Change the host of an arm.", "/msg %s VHOST \n", MASTER_TECHNICIAN}, #endif {"CONNECTARMS", m_connectarms, "Changes ARM connection mode", "/msg %s CONNECTARMS\n", MASTER_TECHNICIAN}, {"SYNCARM", m_syncarm, "Makes you able to fix an arm that has faulty info.", "/msg %s SYNCARM \nTypes are: 0: Rejoin homechan 1: Reconnect to server. 2: Database sync 3: Hard reconnect 4: Reauth with Q\n", MASTER_TECHNICIAN}, {"HTM", m_htm, "Changes High Transfer Mode", "/msg %s HTM\nEnagles or disables High Transfer Mode\nIf HTM is enabled, some functions are disabled (to reduce load)\n", MASTER_TECHNICIAN}, {"AUTOHTM", m_autohtm, "Changes the auto High Transfer Mode value", "/msg %s AUTOHTM\nChanges the number of clicks needed for the system to automatically go into HTM\n", MASTER_TECHNICIAN}, {"VERSION", m_version, "Show version info", "/msg %s VERSION\n", UNAUTHED}, #ifdef VAL {"JA", m_ja, "Rösta ja i valet.", "/msg %s ja för att rösta ja. Nej för att rösta nej. Blank för att rösta blankt.\n", NORMAL}, {"NEJ", m_nej, "Rösta nej i valet.", "/msg %s nej för att rösta ja. Nej för att rösta nej. Blank för att rösta blankt.\n", NORMAL}, {"BLANK", m_blank, "Rösta blankt i valet.", "/msg %s blank för att rösta ja. Nej för att rösta nej. Blank för att rösta blankt.\n", NORMAL}, #endif {"DONE", 0, "DONE", "DONE", 1000} };