.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SHOWTITLE 6" .TH SHOWTITLE 6 "2011-10-20" "3.0.4" "Irssi Scripts" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "Showtitle Irssi Bot Script" .IX Header "Showtitle Irssi Bot Script" Showtitle is an Irssi script that scans the current private, public or action message for a string matching a \s-1URL\s0 specification. If it finds one, it then tries to get the beginning of the \s-1URL\s0 contents in order to parse out the tag, and then attempts to show it either to the channel, or to the script user. .PP Showtitle is an active bot script, i.e, it responds to certain types of text on channels it is listening on. .PP The channel text to invoke showtitle commands is \*(L"!st\*(R" at the beginning of the line. .SS "!st subcommands:" .IX Subsection "!st subcommands:" \fI\f(BIlisten\fI \fI(on|off|list)\fI\fR .IX Subsection "listen (on|off|list)" .PP Determines whether showtitle will be listening to a particular channel. .IP "\(bu" 4 \&\f(CW\*(C`on\*(C'\fR \- turn listening on for this chatnet/channel .IP "\(bu" 4 \&\f(CW\*(C`off\*(C'\fR \- turn listening off for this chatnet/channel .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \- show current channels listened to on this chatnet .IP "\(bu" 4 \&\f(CW\*(C`help\*(C'\fR \- send help info about listen command to nick that entered the !st command .PP \fI\f(BIfilter\fI \fI(add|delete|list|help)\fI\fR .IX Subsection "filter (add|delete|list|help)" .PP Modifies the filters for the current chatnet/channel. If no filters are specified, and listening is on for this chatnet/channel, then all \&\s-1URL\s0 title are sent to the channel. Filters are pass filters, rather than no-pass filters, i.e. they determine what is allowed to send to the channel. .IP "\(bu" 4 \&\f(CW\*(C`add\*(C'\fR \f(CW\*(C`\*(C'\fR \*(-- add the regex to the filter list .IP "\(bu" 4 \&\f(CW\*(C`delete\*(C'\fR \f(CW\*(C`\*(C'\fR \*(-- remove the regex from the filter list .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \*(-- show current set of filters on this chatnet/channel .IP "\(bu" 4 \&\f(CW\*(C`help\*(C'\fR \*(-- display help info to the calling nick .PP \fI\f(BIuser\fI \fI(add|delete|request [address]|list|help)\fI\fR .IX Subsection "user (add|delete|request [address]|list|help)" .PP Deal with eligible users for managing the showtitle bot. Eligible users are determined by the address part of their hostmask. .IP "\(bu" 4 \&\f(CW\*(C`add\*(C'\fR \*(-- add a user to the showtitle bot's user list .IP "\(bu" 4 \&\f(CW\*(C`delete\*(C'\fR \*(-- delete a user from showtitle bot's user list .IP "\(bu" 4 \&\f(CW\*(C`request\*(C'\fR \fI[address]\fR \*(-- make a request to the bot owner to add someone to the list. If address is not specified, then the calling user's address is used. .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \*(-- list the current users .IP "\(bu" 4 \&\f(CW\*(C`help\*(C'\fR \*(-- send a help message to calling nick .PP \fI\f(BIhelp\fI\fR .IX Subsection "help" .PP send general help to calling user. .SS "\s-1UI\s0 Commands" .IX Subsection "UI Commands" These commands are available to the user running the showtitle script. .PP \fI\f(BI/stuser\fI \fI(add|delete|list)\fI\fR .IX Subsection "/stuser (add|delete|list)" .PP modify user list .PP \fI\f(BI/stfilter\fI \fI(add|delete|list)\fI\fR .IX Subsection "/stfilter (add|delete|list)" .PP modify filter list .PP \fI\f(BI/stlisten\fI \fI(on|off|list)\fI\fR .IX Subsection "/stlisten (on|off|list)" .PP modify listening list .PP \fI\f(BI/stignore\fI \fI(on|off|list)\fI\fR .IX Subsection "/stignore (on|off|list)" .PP Completely ignore any \f(CW\*(C`^!\*(C'\fR input from the channel. This has the effect of essentially hiding showtitle from anyone attempting to determine if there are any bots listening .IP "\(bu" 4 \&\f(CW\*(C`on\*(C'\fR \- turn on ignore on this chatnet/channel .IP "\(bu" 4 \&\f(CW\*(C`off\*(C'\fR \- turn off ignore on this chatnet/channel .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \- show ignored channels on this chatnet .PP \fI\f(BI/stsave\fI\fR .IX Subsection "/stsave" .PP save current configuration .PP \fI\f(BI/ststatus\fI\fR .IX Subsection "/ststatus" .PP show current status across all chatnets/channels .PP \fI\f(BI/stdebug\fI \fI[on|off]\fI\fR .IX Subsection "/stdebug [on|off]" .PP turns debugging for showtitle script on or off, or reports status .SH "Internal Documentation" .IX Header "Internal Documentation" .SS "Irssi Configurable Settings" .IX Subsection "Irssi Configurable Settings" .IP "\(bu" 4 \&\f(CW$st_line_prefix\fR \- the text shown by showtitle when it writes to the channel before the title is given .IP "\(bu" 4 \&\f(CW$st_connect_timeout\fR \- time in seconds before curl connection attempt times out .IP "\(bu" 4 \&\f(CW$st_max_timeout\fR \- time in seconds before curl operation times out .SS "Global Declarations" .IX Subsection "Global Declarations" The following globals are used to enable useful error messages from deep inside some of the functions. .IP "\(bu" 4 \&\f(CW$current_chatnet\fR \- stores the name of the current chatnet that the signal was triggered from.. .IP "\(bu" 4 \&\f(CW$current_channel\fR \- stores the name of the current channel that the signal was triggered from. .IP "\(bu" 4 \&\f(CW$current_url\fR \- the matching \s-1URL\s0 in the signal's data, if any .IP "\(bu" 4 \&\f(CW$empty_re\fR \- a regular expression that matches an empty line .IP "\(bu" 4 \&\f(CW$debug\fR \- flag used to check if debugging output should be sent or not .IP "\(bu" 4 \&\f(CW%listen_on\fR \- determines where we are listening = (chatnet => {channel => listening,}) .IP "\(bu" 4 \&\f(CW%filters\fR \- filters to apply on a per-channel basis = (chatnet => {channel => (filter_regexp)}) .IP "\(bu" 4 \&\f(CW%validusers\fR \- which users are allowed to do certain commands = (chatnet => {channel => (address)}) .IP "\(bu" 4 \&\f(CW%ignores\fR \- enforces ignore on specific chatnet channels = (chatnet => {channel => ignoring (on/off)}) .IP "\(bu" 4 \&\f(CW$major\fR, \f(CW$minor\fR, and \f(CW$subminor\fR .IP "\(bu" 4 \&\f(CW$database_basename\fR \- the name of the data base used to store information, suffixed by major version number .IP "\(bu" 4 \&\f(CW$irssi_dir\fR \- the directory containing current irssi session's parameters, set by \-\-home command line paramter .IP "\(bu" 4 \&\f(CW$database\fR \- full database path name .IP "\(bu" 4 \&\f(CW$database_tmp\fR \- full temporary database path name .IP "\(bu" 4 \&\f(CW$database_old\fR \- full backup database path name .SS "Utility Routines" .IX Subsection "Utility Routines" \fIDebugPrint\fR .IX Subsection "DebugPrint" .PP Print a message to the current window with some debugging information if \f(CW$debug\fR is true. .IP "\(bu" 4 param string \f(CW$debugmsg\fR \- message to print .IP "\(bu" 4 global boolean \f(CW$debug\fR \- test whether debug is on or off .IP "\(bu" 4 returns void .PP \fIirssi_safe\fR .IX Subsection "irssi_safe" .PP Prepare a message for output to Irssi by making sure anything needed is escaped. Currently, that's only the percent sign (%). .IP "\(bu" 4 param string \f(CW$s\fR \- message to clean .IP "\(bu" 4 returns string \- cleaned up string .PP \fIshownotice\fR .IX Subsection "shownotice" .PP Nicely format a string to show up on the user's current window .IP "\(bu" 4 param string \f(CW$s\fR \- message to show .IP "\(bu" 4 returns void .PP \fIshowerror\fR .IX Subsection "showerror" .PP Nicely format an error messge string to show up on the user's current window .IP "\(bu" 4 param string \f(CW$s\fR \- message to show .IP "\(bu" 4 returns void .PP \fIsay_message\fR .IX Subsection "say_message" .PP Say a message to the specified server/channel .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$target\fR \- current channel/query window name .IP "\(bu" 4 param string \f(CW$msg\fR \- message to send .IP "\(bu" 4 returns void .PP \fIme_action\fR .IX Subsection "me_action" .PP send an action message to the current chatnet/channel .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$target\fR \- name of current channel .IP "\(bu" 4 param string \f(CW$msg\fR \- message to send .IP "\(bu" 4 returns void .PP \fIprintOnThisWindow\fR .IX Subsection "printOnThisWindow" .PP send a string to the current window .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$target\fR \- name of current channel .IP "\(bu" 4 param string \f(CW$msg\fR \- message to send .IP "\(bu" 4 returns void .PP \fIlc_irc\fR .IX Subsection "lc_irc" .PP convert the passed string to lower case, special for irc .IP "\(bu" 4 param string \f(CW$str\fR \- string to convert .IP "\(bu" 4 returns string \- convert string .PP \fIuc_irc\fR .IX Subsection "uc_irc" .PP convert the passed string to upper case, special for irc .IP "\(bu" 4 param string \f(CW$str\fR \- string to convert .IP "\(bu" 4 returns string \- convert string .SS "Database handling functions" .IX Subsection "Database handling functions" \fIdo_listen\fR .IX Subsection "do_listen" .PP Process a listen database entry .IP "\(bu" 4 param string \f(CW$chatnet\fR \- the chat network to apply the listen item to .IP "\(bu" 4 param string \f(CW$channel\fR \- the channel to apply the listen item to .IP "\(bu" 4 param string \f(CW$status\fR \- which status to apply (on or off) .PP \fIdo_filter\fR .IX Subsection "do_filter" .PP process the filter database entry .IP "\(bu" 4 param string \f(CW$chatnet\fR \- chatnet to apply the filter string to .IP "\(bu" 4 param string \f(CW$channel\fR \- channel to apply the filter string to .IP "\(bu" 4 param string \f(CW$filter\fR \- filter to apply .PP \fIdo_user\fR .IX Subsection "do_user" .PP process a user database entry .IP "\(bu" 4 param string \f(CW$chatnet\fR \- chatnet to apply the user string to .IP "\(bu" 4 param string \f(CW$channel\fR \- channel to apply the user string to .IP "\(bu" 4 param string \f(CW$user\fR \- user string to apply .PP \fIdo_ignore\fR .IX Subsection "do_ignore" .PP process an ignore database entry .IP "\(bu" 4 param string \f(CW$chatnet\fR \- chatnet to apply the ignore directive to .IP "\(bu" 4 param string \f(CW$channel\fR \- channel to apply the ignore directive to .IP "\(bu" 4 param string \f(CW$status\fR \- ignore directive (or or off) .PP \fIsyntax_error\fR .IX Subsection "syntax_error" .PP Report a syntax error reading and processing the database .PP \fI\f(CI%parse_database\fI\fR .IX Subsection "%parse_database" .PP An associative array containing a jump table to handle each database entry type. Structure is: .IP "\(bu" 4 \&\f(CW\*(C`%parse_database[entrytype] =\*(C'\fR &function;> \- jump table .PP \fIread_database\fR .IX Subsection "read_database" .PP reads and processes the various entries in the database .PP \fIwrite_database\fR .IX Subsection "write_database" .PP Writing the database to file .PP \fIappend_to_database\fR .IX Subsection "append_to_database" .PP Append an entry to the database .IP "\(bu" 4 param array \f(CW@_\fR \- elements to add to the database .SS "\s-1URL\s0 Processing" .IX Subsection "URL Processing" \fIis_html\fR .IX Subsection "is_html" .PP Retrieve the header of the given \s-1URL\s0 to see if it contains \s-1HTML\s0 code .IP "\(bu" 4 param string \f(CW$url\fR \- the url to check .IP "\(bu" 4 returns boolean \- true if url contains \s-1HTML\s0, false if not .PP \fIgrab_page\fR .IX Subsection "grab_page" .PP get the page for the specified \s-1URL\s0 \*(-- possibly only a fragment .IP "\(bu" 4 param string \f(CW$url\fR \- the url to grab .IP "\(bu" 4 returns string \- contents of page .PP \&\fBdescription\fR: .PP Uses curl (command line version) to pull over the contents of the specified \s-1URL\s0. The curl command is set to be silent, unless the command fails. Other parameters to the curl command include the output file name, the user agent string, a connect timeout and a max timeout, and to follow relocation headers (302s) from the web server. .PP \fIget_title\fR .IX Subsection "get_title" .PP Pull the title from the contents and clean it up .IP "\(bu" 4 param string \f(CW$content\fR \*(-- the contents of the web page .IP "\(bu" 4 returns string \*(-- the cleaned up and presentable title .PP \fIfind_url\fR .IX Subsection "find_url" .PP Extract the url from the message text .IP "\(bu" 4 param string \f(CW$text\fR \- the contents of the \s-1IRC\s0 message we're processing .IP "\(bu" 4 return string \- the \s-1URL\s0 extracted, or undef otherwise .PP find_url will match on the text for various \s-1URL\s0 schemes (currently only supporting \s-1FTP\s0 and \s-1HTTP\s0). In addition, if the bareword \*(L"www\*(R" precedes a triple-word, it is treated as an \s-1HTTP\s0 \s-1URL\s0 and modified accordingly. .PP \fIpass_filter\fR .IX Subsection "pass_filter" .PP Check to see if the url passes various filters .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$target\fR \- name of current channel/query .IP "\(bu" 4 param string \f(CW$url\fR \- current url .IP "\(bu" 4 returns boolean \- true if it passes filters, false if not .PP \fIshowtitle\fR .IX Subsection "showtitle" .PP Main logic of the script \*(-- display the title of a given \s-1URL\s0 on either the target's channel, or to the user's screen .IP "\(bu" 4 param object \f(CW$server\fR \- the server where the \s-1URL\s0 was shown .IP "\(bu" 4 param string \f(CW$msg\fR \- the data from the current irc message .IP "\(bu" 4 param string \f(CW$target\fR \- the current window .PP \&\fBshowtitle\fR checks the message to see if it contains a valid \s-1URL\s0 string (currently only ftp: and http: are supported). \fBshowtitle\fR will also match if the string begins with \*(L"www\*(R". It then checks to see if the \s-1URL\s0 contains an \s-1HTML\s0 content type. .SS "Command Processing" .IX Subsection "Command Processing" \fIis_validuser\fR .IX Subsection "is_validuser" .PP Checks to see if calling user is in the list of valid users .IP "\(bu" 4 param string \f(CW$user\fR \- user to validate .IP "\(bu" 4 param string \f(CW$chatnet\fR \- current chatnet .IP "\(bu" 4 param string \f(CW$channel\fR \- current channel .IP "\(bu" 4 returns boolean \- whether user is valid or not .PP \fIprocess_listen\fR .IX Subsection "process_listen" .PP Process an !st listen on/off request .IP "\(bu" 4 param string \f(CW$status\fR \- whether to turn listening on or off .IP "\(bu" 4 param object \f(CW$server\fR .IP "\(bu" 4 param string \f(CW$nick\fR \- user sending request .IP "\(bu" 4 param string \f(CW$address\fR \- address of nick sending request .IP "\(bu" 4 param string \f(CW$target\fR \- channel or query originating request .IP "\(bu" 4 returns void .PP \fIshow_listen\fR .IX Subsection "show_listen" .PP List the current channels being listened to for urls .IP "\(bu" 4 param object \f(CW$server\fR .IP "\(bu" 4 param string \f(CW$nick\fR .IP "\(bu" 4 param string \f(CW$address\fR .IP "\(bu" 4 param string \f(CW$target\fR .PP \fIlisten_help\fR .IX Subsection "listen_help" .PP .Vb 1 \& Provide help to the calling user, sent as private message. .Ve .IP "\(bu" 4 param object \f(CW$server\fR .IP "\(bu" 4 param string \f(CW$nick\fR .IP "\(bu" 4 param string \f(CW$address\fR .IP "\(bu" 4 param string \f(CW$target\fR .PP \fIshow_listen_status\fR .IX Subsection "show_listen_status" .PP Show whether the current chatnet/channel is being listened to .IP "\(bu" 4 param object \f(CW$server\fR .IP "\(bu" 4 param string \f(CW$nick\fR .IP "\(bu" 4 param string \f(CW$address\fR .IP "\(bu" 4 param string \f(CW$target\fR .PP \fIadd_filter\fR .IX Subsection "add_filter" .PP Add a filter to the current channel. Filters are treated as regexes. If a filter is specified as \*(L"qr/.../\*(R", then it will be evaled as is, if it isn't, then \*(L"qr/\*(R" and \*(L"/\*(R" will be wrapped around what ever is given. .IP "\(bu" 4 param string \f(CW$filter\fR \*(-- the filter to add .IP "\(bu" 4 param object \f(CW$server\fR .IP "\(bu" 4 param string \f(CW$nick\fR .IP "\(bu" 4 param string \f(CW$address\fR .IP "\(bu" 4 param string \f(CW$target\fR .PP \fIdelete_filter\fR .IX Subsection "delete_filter" .PP Deletes a given filter. Filters are regexes. If a filter is specifed with \*(L"qr/.../\*(R" then it is used as is. Otherwise \*(L"qr/\*(R" and \*(L"/\*(R" are wrapped around teh filter text and it is evaled. .IP "\(bu" 4 param string \f(CW$filter\fR \*(-- the filter to delete .IP "\(bu" 4 param object \f(CW$server\fR .IP "\(bu" 4 param string \f(CW$nick\fR .IP "\(bu" 4 param string \f(CW$address\fR .IP "\(bu" 4 param string \f(CW$target\fR .PP \fIshow_filters\fR .IX Subsection "show_filters" .PP Give a list of filters on the current channel .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIfilter_help\fR .IX Subsection "filter_help" .PP Send help messages to calling nick as private messages .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIshow_filter_status\fR .IX Subsection "show_filter_status" .PP Show what the current filter status is on channel (on or off) .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIadd_user\fR .IX Subsection "add_user" .PP Add a user to the authorized users list for this channel .IP "\(bu" 4 param string \f(CW$user\fR \*(-- user to add to authorized user's list (currently is host part of their hostmask) .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIdelete_user\fR .IX Subsection "delete_user" .PP Remove a user to the authorized users list for this channel .IP "\(bu" 4 param string \f(CW$user\fR \*(-- user to remove to authorized user's list (currently is host part of their hostmask) .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIlist_users\fR .IX Subsection "list_users" .PP Show the current set of authorized users for the chatnet/channel .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIuser_request\fR .IX Subsection "user_request" .PP Send a user request to the owner of the bot to add to authorized users .IP "\(bu" 4 param string \f(CW$user\fR \*(-- user to remove to authorized user's list (currently is host part of their hostmask) .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIuser_help\fR .IX Subsection "user_help" .PP Send help info to requesting user as private messages .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIshow_user_status\fR .IX Subsection "show_user_status" .PP Say whether the requesting user is an authorized user or not .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIshowtitle_help\fR .IX Subsection "showtitle_help" .PP Send help info to requesting user as private messages .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$nick\fR \- nick of person making request .IP "\(bu" 4 param string \f(CW$address\fR \- address of person making request .IP "\(bu" 4 param string \f(CW$target\fR \- channel/query to send to .PP \fIparse_command jump table\fR .IX Subsection "parse_command jump table" .PP A jump table to determine which subroutine to use to process the command .PP \fIprocess_command\fR .IX Subsection "process_command" .PP process the command given with the \f(CW\*(C`st\*(C'\fR trigger .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$msg\fR \- command from channel .IP "\(bu" 4 param string \f(CW$nick\fR \- requesting user .IP "\(bu" 4 param string \f(CW$address\fR \- address of requesting user .IP "\(bu" 4 param string \f(CW$target\fR \- name of channel/query .IP "\(bu" 4 returns void .PP \fIignored\fR .IX Subsection "ignored" .PP returns true if the current chatnet/channel is being ignored .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$target\fR \- name of current channel/query .IP "\(bu" 4 returns boolean .PP \fIsig_showtitle\fR .IX Subsection "sig_showtitle" .PP Process the signals from a channel for showtitle requests and URLs .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$msg\fR \- message received .IP "\(bu" 4 param string \f(CW$nick\fR \- user who send the message .IP "\(bu" 4 param string \f(CW$address\fR \- address of user .IP "\(bu" 4 param string \f(CW$target\fR \- name of channel/query sending message .IP "\(bu" 4 returns void .PP \fIsig_own_showtitle\fR .IX Subsection "sig_own_showtitle" .PP Process the signals from self for showtitle requests and URLs .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param string \f(CW$msg\fR \- message sent .IP "\(bu" 4 param string \f(CW$target\fR \- name of channel/query sending message to .IP "\(bu" 4 returns void .SS "\s-1UI\s0 commands" .IX Subsection "UI commands" \fIcmd_stuser\fR .IX Subsection "cmd_stuser" .PP Dispatch the appropriate user command. .IP "\(bu" 4 param string \f(CW$data\fR \- data from the command .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window item .IP "\(bu" 4 returns void .PP \&\f(CW\*(C`cmd_stuser\*(C'\fR uses the \f(CW\*(C`Irssi::command_runsub\*(C'\fR to dispatch the appropriate subcommand based on the first word in the \f(CW$data\fR string. Commands include: .IP "\(bu" 4 \&\f(CW\*(C`add\*(C'\fR \*(-- add a user .IP "\(bu" 4 \&\f(CW\*(C`delete\*(C'\fR \*(-- remove a user .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \*(-- list users .PP \fIcmd_stuser_add\fR .IX Subsection "cmd_stuser_add" .PP Add a user to the authorized user list for a given channel and chatnet .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the user to add as: .PP \&\f(CW\*(C`/stuser add [[[chatnet] channel] hostmask]\*(C'\fR .PP \fIcmd_stuser_delete\fR .IX Subsection "cmd_stuser_delete" .PP Delete a user based on chatnet, channel and/or hostmask .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the user to delete as: .PP \&\f(CW\*(C`/stuser delete [[[chatnet] channel] hostmask]\*(C'\fR .PP \fIcmd_stuser_list\fR .IX Subsection "cmd_stuser_list" .PP List the current set of users .IP "\(bu" 4 param string \f(CW$data\fR \- command line data .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP \fIcmd_stfilter\fR .IX Subsection "cmd_stfilter" .PP Dispatch the appropriate filter command. .IP "\(bu" 4 param string \f(CW$data\fR \- data from the command .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window item .IP "\(bu" 4 returns void .PP \&\f(CW\*(C`cmd_stfilter\*(C'\fR uses the \f(CW\*(C`Irssi::command_runsub\*(C'\fR to dispatch the appropriate subcommand based on the first word in the \f(CW$data\fR string. Commands include: .IP "\(bu" 4 \&\f(CW\*(C`add\*(C'\fR \*(-- add a filter .IP "\(bu" 4 \&\f(CW\*(C`delete\*(C'\fR \*(-- remove a filter .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \*(-- list filters .PP \fIcmd_stfilter_add\fR .IX Subsection "cmd_stfilter_add" .PP Add a filter to the authorized filter list for a given channel and chatnet .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the filter to add as: .PP \&\f(CW\*(C`/stfilter add [[[chatnet] channel] hostmask] [qr/]regex[/]\*(C'\fR .PP \fIcmd_stfilter_delete\fR .IX Subsection "cmd_stfilter_delete" .PP Delete a filter to the authorized filter list for a given channel and chatnet .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the filter to delete as: .PP \&\f(CW\*(C`/stfilter delete [[[chatnet] channel] hostmask] [qr/]regex[/]\*(C'\fR .PP \fIcmd_stfilter_list\fR .IX Subsection "cmd_stfilter_list" .PP List the current set of filters .IP "\(bu" 4 param string \f(CW$data\fR \- command line data .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP \fIcmd_stlisten\fR .IX Subsection "cmd_stlisten" .PP Dispatch the appropriate listen command. .IP "\(bu" 4 param string \f(CW$data\fR \- data from the command .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window item .IP "\(bu" 4 returns void .PP \&\f(CW\*(C`cmd_stlisten\*(C'\fR uses the \f(CW\*(C`Irssi::command_runsub\*(C'\fR to dispatch the appropriate subcommand based on the first word in the \f(CW$data\fR string. Commands include: .IP "\(bu" 4 \&\f(CW\*(C`on\*(C'\fR \*(-- add a channel to listen on .IP "\(bu" 4 \&\f(CW\*(C`off\*(C'\fR \*(-- remove a channel from listening .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \*(-- list channels listened to .PP \fIcmd_stlisten_on\fR .IX Subsection "cmd_stlisten_on" .PP Turn on listening for the specified chatnet/channel .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the listen channel as: .PP \&\f(CW\*(C`/stlisten on [[chatnet] channel]\*(C'\fR .PP \fIcmd_stlisten_off\fR .IX Subsection "cmd_stlisten_off" .PP Turn off listening on the specified chatnet/channel .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the filter to delete as: .PP \&\f(CW\*(C`/stlisten off [[chatnet] channel]\*(C'\fR .PP \fIcmd_stlisten_list\fR .IX Subsection "cmd_stlisten_list" .PP List the channels being listened to .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP \fIcmd_stignore\fR .IX Subsection "cmd_stignore" .PP Dispatch the appropriate ignore command. .IP "\(bu" 4 param string \f(CW$data\fR \- data from the command .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window item .IP "\(bu" 4 returns void .PP \&\f(CW\*(C`cmd_stignore\*(C'\fR uses the \f(CW\*(C`Irssi::command_runsub\*(C'\fR to dispatch the appropriate subcommand based on the first word in the \f(CW$data\fR string. Commands include: .IP "\(bu" 4 \&\f(CW\*(C`on\*(C'\fR \*(-- add a filter .IP "\(bu" 4 \&\f(CW\*(C`off\*(C'\fR \*(-- remove a filter .IP "\(bu" 4 \&\f(CW\*(C`list\*(C'\fR \*(-- list filters .PP \fIcmd_stignore_on\fR .IX Subsection "cmd_stignore_on" .PP Turn on ignore for a given chatnet/channel .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the filter to delete as: .PP \&\f(CW\*(C`/stignore on [[chatnet] channel]\*(C'\fR .PP \fIcmd_stignore_off\fR .IX Subsection "cmd_stignore_off" .PP Stop ignoring a given chatnet/channel .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP The user can specify the filter to delete as: .PP \&\f(CW\*(C`/stignore off [[chatnet] channel]\*(C'\fR .PP \fIcmd_stignore_list\fR .IX Subsection "cmd_stignore_list" .PP Show the channels being ignored .IP "\(bu" 4 param string \f(CW$data\fR \- data string from command line .IP "\(bu" 4 param object \f(CW$server\fR \- current server object .IP "\(bu" 4 param object \f(CW$witem\fR \- current window object .PP \fIcmd_save\fR .IX Subsection "cmd_save" .PP Save the database .PP \fIcmd_ststatus\fR .IX Subsection "cmd_ststatus" .PP Give a current status of everything. .PP \fIcmd_debug\fR .IX Subsection "cmd_debug" .PP Turn debugging on or off .PP \&\fBUsage:\fR /stdebug [on|off] .PP \&\f(CW\*(C`on\*(C'\fR \- turn on debugging .PP \&\f(CW\*(C`off\*(C'\fR \- turn off debugging .PP \&\fIomitted\fR \- show current debugging status