User:Operator873/CabalBot

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Languages: English · français · português

CabalBot is an IRC Eggdrop Bot which runs on the freenode.net IRC server. I designed the bot to help with unofficial channels and to bring additional functions to #cvn-simplewikisconnect. The bot will not recognize IRC nicks that are not registered or do not possess a wiki(p/m)edia or CVN hostmask. Additionally, the bot will not respond in #cvn-simplewikis to nicks that are not voiced. Cabalbot also announces Abuse Filter hits in the #cvn-simplewikis channel and can relay recent changes in emergencies such as SWBot3 becomes disconnected or non-functional.

CVN Staff, Channel Operators, and SuperUsers: typing @emergencystop will cause CabalBot to devoice itself in CVN channels. If whatever activity does not stop, please kick/ban the bot by typing /kickban CabalBot or /mode #channel_name +b *!*@operator873.com followed by /kick CabalBot. CVN staff must be opped in the CVN channels to be recognized by CabalBot.

CabalBot currently also resides in #wikipedia-simpleconnect and other channels approved by request.

A mighty thank you to Vermont and BRPever for being my test subjects and allowing me to annoy them with testing CabalBot. I appreciate you very, very much.

WiktBot873 is a copy of CabalBot which has been modified for Wiktionary use, but still uses the same commands below.

CabalBot is in the process of being rewritten in Python. Suggestions, tips, and shortcuts are welcomed here.

User Levels[edit]

Level Name Description
0 Public Bot will ignore most commands from public users. For access, contact Operator873 or obtain a wiki(p/m)edia cloak.
1 User Users in good standing with the WMF community can be provided access to the bot upon request. Contact Operator873.
1 (auto) Wiki(p/m)edian Users with a Wikipedia, Wikimedia, or Countervandalism cloak are immediately recognized by the bot and have user level access with no further intervention required.
2 WMF admin Sysops, crats, and stewards are provided this access level upon request. Access to some additional commands is provided.
3 Channel Operator On some channels, CabalBot is a channel operator. The users who are able to access CabalBot's channel operator functions are added to this access level.
4 SuperUser SuperUsers have access to nearly all functions of CabalBot, including the userfile.
5 873Gear 873Gear created by or used by Operator873 that require access to the bot's system. Includes authority level of CVN bots.
6 Owner Operator873

Special Level Access[edit]

There is currently one command and more commands which are planned that are restricted based on an editor's role or permission level. These levels are manually maintained in the bot by Operator873. If you are a sysop, crat, or steward and would like to request higher level access to the bot, please leave me a talk page message, email me, or contact me on IRC. Thank you.

Commands[edit]

Format: <command> <variable string>

Command Variable Example Result
AutoLink873 [[Main Page]] AutoLink873 watches all IRC messages and provides a URL for [[wikilinks]] that are said in the channel. It also converts {{templates}} to a URL as well. Level 2+ users may turn on or off AutoLink873 by using !setlink on or !setlink off
@AbuseFilterOn @AbuseFilterOn Turns on the Abuse Filter relay. (Restricted to SuperUsers and CVN staff.)
@AbuseFilterOff @AbuseFilterOff Turns off the Abuse Filter relay. (Restricted to SuperUsers and CVN staff.)
@backlog @backlog Queries the Simple English Wikipedia API for information related to Quick Delete requests, Requests for deletion, and unblock requests. (Restricted to WMF admins and above due to API usage.)
@block <project> <nick> @block simple Some Nick Here Returns a URL for a sysops in the channel to quickly access the block options for a given nick or IP address on a specific project. The <project> parameter is only required in channels a default language as not been specified in. (Restricted to WMF sysops or SuperUsers.).

(CabalBot: Sysop may block at https://simple.wikipedia.org/wiki/Special:BlockUser/Some_Nick_Here)

@ca <nick> @ca Some Nick Here Will produce the CentralAuth URL on meta for the provided nick.

(CabalBot: https://meta.wikimedia.org/w/index.php?title=Special%3ACentralAuth&target=Some_Nick_Here)

@contribs <project> <nick> @contribs simple Some Nick Here Returns a URL for contributions on the given project for the supplied nick. Will work with IPv4 or IPv6 addresses. The <project> parameter is only required in channels a default language as not been specified in.

(CabalBot: https://<project>.wikipedia.org/wiki/Special:Contributions/<Some_Nick_Here>)

@count <item> @count articles Queries the MediaWiki API and returns the number of given items. Currently able to count pages, articles, users, activeusers, and sysops.
@emergencystop @emergencystop Should only be used when CabalBot is malfunctioning and causing undesirable disruption in a channel. (Restricted to CVN staff, ChanOps, and SuperUsers.)
@geo <IPv4 or IPv6 address> @geo 123.123.1.1 Returns a URL to geolocate an IP address.

(CabalBot: Geolocate IP https://whatismyipaddress.com/ip/123.123.1.1)

@google <search string> @google Something Returns a URL to use Google to search for the given string.
@guc <nick> @guc Some Nick Here Returns a URL for the Global User Contributions tool on WMF Labs for edits in the last hour. Useful for finding x-wiki vandalism.

(CabalBot: https://tools.wmflabs.org/guc/?src=hr&by=date&user=Some_Nick_here)

@gucall <nick> @gucall Some Nick Here Returns a URL for the Global User Contributions tool on WMF Labs for all edits (much slower). Useful for researching activities.

(CabalBot: https://tools.wmflabs.org/guc/?user=Some_Nick_here)

@ipintel <IPv4 or IPv6 address> @ipintel 123.123.1.1 Returns a URL for the Toolforge WHOIS tool with the provided IP address already targeted.

(CabalBot: WHOIS lookup: https://tools.wmflabs.org/whois/gateway.py?lookup=true&ip=123.123.1.1)

@ipqs <IPv4 or IPv6> @ipqs 123.123.1.1 Returns a URL for a website that detects proxies and other malicious IP events.

(CabalBot: IP Quality Score: https://www.ipqualityscore.com/free-ip-lookup-proxy-vpn-test/lookup/123.123.1.1)

@link <project> <target> @link simple WP:ANI Returns a properly formatted link to the provided target Wikipedia page. The <project> parameter is only required in channels a default language as not been specified in.
@log <project ><username> @log <project ><username> Returns a link to the provided account's public logs on the provided project. The <project> parameter is only required in channels a default language as not been specified in.
@nerelayon @nerelayon Turns on the Nepal Wikipedia Recent Changes feed in #wikipedia-ne
@nerelayoff @nerelayoff Turns off the Nepal Wikipedia Recent Changes feed in #wikipedia-ne
@portscan <target IP> @portscan 123.123.1.1 Returns a URL for the ipcheck WMF tool with the port scan option activated.
@pton @pton Turns on the Portuguese Recent Changes feed for #wikipedia-pt-bots
@ptoff @ptoff Turns off the Portuguese Recent Changes feed for #wikipedia-pt-bots
@proxy <target IP> @proxy 123.123.1.1 Returns a URL for the ipcheck WMF tool to check for open proxies.
@qd @qd Returns URLs for the articles currently tagged for Quick Deletion via the Simple English Wikipedia API.
@RelayOn @RelayOn Activates CabalBot's Simple Wikipedia Recent Changes feed. (Restricted to SuperUsers and CVN staff.)
@RelayOff @RelayOff Shuts down CabalBot's Simple Wikipedia Recent Changes feed. (Restricted to SuperUsers and CVN staff.)
@rfd @rfd Uses the Simple English Wikipedia API to return the number of articles listed at Request for Deletion and URL to the page.
@stalk <nick> @stalk Some Nick Here Returns a URL for the Stalk Toy at WMF Labs.

(CabalBot: Stalk toy: https://tools.wmflabs.org/meta/stalktoy/Some_Nick_Here}

@unblocks @unblocks Returns URLs for users currently requesting unblock. Obtained via the Simple English Wikipedia API.
@urban <search string> @urban something Returns a link to the Urban Dictionary defining the word or phrase in the search string.
@userinfo <accountname> @userinfo accountname Returns information from the SEWP API with edit count and user groups for the provided account name. @user is also accepted for this command.
@wishlist <string> @wishlist more bots!!! Adds the request to a "Wish List" for CabalBot features and functions. Received only by Operator873.
@xact <user> @xact accountname Returns a URL for the CrossWiki activity of the given user.
@xcon <user> @xcon accountname Returns a URL for cross wiki contributions of the given user.
@xtools <nick> @xtools Some Nick Here Returns a URL for xtools on the supplied nick. Will work with IPv4 or IPv6 addresses.

(CabalBot: https://xtools.wmflabs.org/ec/simple.wikipedia.org/Some_Nick_Here)

Not Available Not Available Only responds to ChenzwBot CabalBot will auto respond to ChenzwBot's messages regarding missed vandalism and provide the contributions link for the nick ChenzwBot has alerted on. This command will not work for any other user on IRC.

(CabalBot: Above user's contribs: https://simple.wikipedia.org/wiki/Special:Contributions/Some_Nick_Here)

Not Available Not Available Only responds to ChenzwBot CabalBot will auto respond to ChenzwBot reporting adding an account to VIP by supplying the appropriate block link. This command will not work for any other nick on IRC.

(CabalBot: VIP link https://simple.wikipedia.org/wiki/Wikipedia:Vandalism_in_progress // Sysop, Block link is: https://simple.wikipedia.org/wiki/Special:BlockUser/Some_Nick_Here)


Channel Op Commands[edit]

CabalBot has channel protection capabilities in channels that it is opped in. The ChanOp commands are:

Usage: <command> <string>

Command String Result
!kick <nick> <reason> Bot will kick the specific nick from the channel. <reason> is free text and can contain several words.
!ban <nick> Bot will ONLY ban (not kick) the specified nick with format *!ident@hostmask/IP
!banip <string> Bot will add a channel ban exactly as typed in <string>. (Example: !banip *!*@*this.ip.address* / !banip *!ident@* / !banip SomeDumNick!*@*)
!kb <nick> <reason> Bot will kick the specified nick, create a ban with format *!ident@hostmask/IP, then attempt to kick the nick again should it have auto-rejoined. <reason> is free text and can contain several words.
!opme Bot will check for existing permission (set by Operator873). If perm is found, will op the nick. If perm is not found, will not op.
!deopme Bot will remove the channel operator mode from user. (Don't idle in channel with ChanOp active)
!invite <nick> Bot will check for existing permission (set by Operator873). If perm is found, bot will invite given nick to the channel.
!unban <ident> <hostmask> Bot will remove specified ban from channel. Must be formatted as: !unban ident hostmask (example: !unban sid00000 wikipedia/Person)
!hush CabalBot will stop responding to social commands.
!speak CabalBot will resumes responding to social commands.
!chat CabalBot will respond socially when spoken to
!chatoff CabalBot will not respond to social chats.
!voice <nick> CabalBot will add +v to the nick provided.
!devoice <nick> CabalBot will remove voice (-v) from the provided nick.
@response <what you want CabalBot to say> Add a custom social response that may be randomly selected from the database when someone speaks socially to CabalBot.

CabalBot User Logs/Notes[edit]

Users who request this access to the bot will be able to create log files that can be either exported or read directly by the bot. The files are isolated from each other and users can only modify the files they own. If you would like this access, please contact Operator873 on IRC.

Command Target Action Result
.file <filename> backup Creates an unaccessible copy of the target file. (Contact Operator873 on IRC to obtain a copy of the file.)
.file <filename> export Creates an unaccessible copy of the target file formatted to be easily edited by user. (Contact Operator873 on IRC to obtain a copy of the file.)
.file <filename> log Creates a new line in the file named <filename> containing everything after the word "log" (Example: .file test log This message)
.file <filename> index Reads the target file and returns the number of entries in the log file. (Example: .file test index /// Might return 8 lines in the file)
.file <filename> indexshared Reads the target shared file and returns the number of entries in the log file. (Example: file text indexshared)
.file list Returns the available files in the nick's directory. (Example: .file list)
.file list shared Returns the available files in the shared directory. (Example: .file list shared)
.file <filename> read # Replace "#" with the line number you want the bot to read. (Example: .file test read 3)
.file <filename> readshared # Replace "#" with the line number you want the bot to read of the shared file. (Example: .file test readshared 1)
.file <filename> share Copies the file from the protected nick's directory to the shared folder. (Example: .file test share) File name will be saved as "Nick_filename"
.file <filename> send Sends the full contents of a file to the nick's Private Message. Use caution! Potential to flood. (Example: .file test send)
.file <filename> purge Deletes all information in the target file. (Example: .file test purge)
.file <filename> purgeshared Deletes all information in the target shared file. (Example: .file <filename> purgeshared)

Userfile Maintenance[edit]

SuperUsers are able to manipulate the userfile and other features of CabalBot. SuperUsers are selected by Operator873.

Command Target Action Result
.user <nick> add Adds a new user to the userfile.
.user <nick> level Returns the Access Level for the supplied nick.
.user <nick> key Queries the bot to determine if the nick has a key.
.user <nick> give (Access Level # or key) Sets access flags for the provided nick
.user <nick> remove (Access Level # or key) Removes flag which grants that access level. (Example: .user DumNick remove 3 will remove access level 3, but leave access level 2 intact.)
.user <nick> ban Removes all access levels and adds the nick's hostmask to the bot's "ban on sight" function (if bot is the Channel Operator).
.user <nick> del Removes user information from userfile.

Suggestions[edit]

Suggestions are welcome! You may add them below on the talk page.