ircN Addon FAQ To have your ircN Addon distributed on this page and/or #ircN@EFnet, then you must follow these set of rules. The ircN Development Team reserves the right to discriminate against any themes that feels will detract from ircN or those which were made specifically to harrass other users of ircN or IRC. NOTE: The addon2 format is a new format for installing or uninstalling addons. One .ad2 file can be used to intelligently install or uninstall the addon with a single command, namely the /addon2 and /unaddon2 aliases. The format HAS BEEN CHANGED! OLDVER* and BADVER* no longer carry an AVER-type entry, but a filename. Specifically, the name of the .ad2 file of the old addon. If you wish to use oldver* or badver* with your addons, use a different .ad2 filename with older addons. Note that %aver no longer holds the AVER entry in the .ad2 file, but the .ad2 filename. The /av alias and the ADDON ctcp checks each .ad2 file listed in %aver and displays the AVER entry from each one. Creating an Addon for ircN Rules 1. No ircN alias, variable, text, or script can be altered, removed, or replaced. 2. You must base your installer on sample.ad2. NO REQUIRED ENTRIES MAY BE OMITTED! 3. All files must be located inside the addon directory or a subdirectory. 4. Variable names must start with your addon suffix, followed by a period, and then the name which you would normally call it. i.e. %blah.ver %blah.mode 5. The script itself that will be loaded upon completion of the addon installation should be only ONE file loaded into the remote (Unless your script is over 30k). 6. Do not add any popup menus to the Menubar or Status Window. Any other popup menus are fine. Also keep the length of the addition to the popups short so the popups dont get stretched out. 7. The addon should have an option to uninstall itself completely without conflicting with any other loaded addon or ircN. A "/unaddon2 filename.ad2" will suffice somewhere in an alias or popup. To get credit in ircN using /scriptinfo, save your addon in non-ini format, something with an extension other than .ini, and add these lines at the top or bottom of your script. ;%%%%%%%%%%%%%%%%%%%%%%%% ;script ircN ;version 7.0 ;author Quietust ;url http://www.ircN.org ;%%%%%%%%%%%%%%%%%%%%%%%% Of course you will need to substitute your info for mine. Helpful ircN Identifiers There are other identifiers not listed here and can be found in the identifiers section of this help file. $usr(nickname) looks up and returns a person's username $pages returns how many pages there are $nc(nick) or $nc(nick,#channel) returns full length of nick if found. If channel is supplied, checks in the given channel instead of the active one. $swlc(@WindowName) saves the window coordinates to a variable. ie. /set %yourvar $swlc(@MyWindow) then: /window -switch @MyWindow %yourvar [other cmds] $clop(nick,chan) returns @nick, +nick, or nick depending on what flags nick has on chan. $chkop(nick) returns '1' if you are opped on a channel that nick is not on. returns '0' if no channels are found. $a.numsg returns how many saved messages there are. $a.f(text) removes '|' and '/' from text to prevent a mIRC exploit if $read -n or $readini -n is not used. $oc(value,%variable) returns '[value]' if the %variable is set to 'on' returns nothing if anything else $sd(nick,chan) returns '$true' if nick is banned from channel. returns '$false' if nick isnt. $atime returns the time in am/pm format $getdate returns the full date/time $gettz returns the user's timezone in GMT +/- xxxx format $chkflag(nick,chan,flag) returns '$true' if the nick has the given userlist flag in the given channel flags OR global flags returns '$false' if the nick does not habe the given userlist flag Valid flags are: f == protected a == autoop (check +o) o == op v == voice b == bot g == getops from bot k == auto-kickban d == auto-deop m == master n == owner p == partyline access x == files area access (not yet implemented) j == files area janitor (not yet implemented) c == auto-accept DCC chats s == auto-accept DCC sends r == allow user to use remote control i == ircN user (use +g to get ops) Any other flags can be used as custom flags in your addon, but make sure your addon does not use the same flags as another addon does, or prompt which flag to use when the addon is installed. $iduration(time) converts the time from seconds to minutes, hours, days, weeks, the seconds is returned to up to 3 decimal places if the duration is less than a minute, and 2 decimal places if it is less than an hour. $fix(length,text) aligns text on left according to length given. $lfix(length,text) aligns text on the right according to length given. $rsc(duration) removes spaces and trailing letters from $duration. ie. 1day 4hrs 3mins returns '1d4h3m' $rsc2(duration) removes trailing letters from $duration. ie. 1day 4hrs 3mins returns '1d 4h 3m' $kps(cps) returns cps into kps format. ie. 2435 cps returns 2.43 kps $rrpt(ticks) converts ticks into seconds. ie. 34343 returns 34.343 Math Identifiers $pls(parm1,parm2) - returns addition of parm1 to parm2. $sub(parm1,parm2) - returns subtraction of parm1 from parm2. $div(parm1,parm2) - returns division of parm1 by parm2. $mpy(parm1,parm2) - returns multiplication of parm1 to parm2. $sqr(parm1) - returns the square root of parm1. $rot(parm1,parm2) - returns the parm2th root of parm1. $sum(parms) - returns the sum of all the paramaters. $pwr(parm1,parm2) - returns parm1 to the power of parm2. $mod(parm1,parm2) - returns the modulus of parm1 and parm2. $const.pi(N) - returns pi to N decimal places (max of 65). $const.abz - returns absolute zero in degrees Celsius. $const.c - returns the speed of light in m/s Color Identifiers $sc(text) - returns text in the secondary colour. $hc(text) - returns text in the highlight colour. $ac(text) - returns text in alternate colour Directory Location Identifiers $themedir(file) - returns the file path of the theme directory $adn(file) - returns the file path in the addon directory. $atp(file) - returns the file path in the addon temp directory. $atd(file) - returns the file path of the addon text diretory. $td(file) - returns the file path in the text directory. $tp(file) - returns the file path in the temp directory. $dd(file) - returns the file path in the docs directory. $root(file) - returns the file path in root directory. Useful Aliases /iecho - echos the text to the active window (or status window if the current window is a custom @window) with the ircN header in front of it. (also with "ircN:" header if active window is an @irc2 window) /iiecho - echos the text into the current window (or status window if the current window is a custom @window). (with "ircN>" header if active window is an @irc2 window) /aecho - echos the text into the active window (with "ircN>" header if active window is an @irc2 window). /secho - echos the text into the status window. /qplay <-r|-s|-f> [section|start] [lines|end] Plays a file without echoing the the queueing. -r - plays a range from the start line number to the end line number. -f - plays an entire file -s - plays a section for the number of lines specified, a section is a standard mIRC file section with lines: n0=command1 n1=command2 and so on, the playing to the number of lines specified. Window Manipulation Effects /bg <@Window> [width] /bg @IrcN 3 10 or /bg @IrcN 3 10 100 will fill the background of the window starting from the bottom to the 10th line using color 3. 100 is width size, if none is given, whole background is filled. /tbg <@Window> [width] /tbg @IrcN 2 10 or /tbg @IrcN 2 10 100 same as /bg except lines come in from the top. NOTE: you must have already filled in these lines in the Window box for this to work. /wlmv <@Window> /wlmv @IrcN 5 6 10 0 40 blah will scroll the text 'blah' from the left to the right on the 10th line using color 5 as the text color and color 6 as the background color starting at position 0 of the Window box and halting at position 40. Text will remain on the line until removed. /wrmv <@Window> /wrmv @IrcN 5 6 10 50 0 blah will scroll the text 'blah' from the right to left on the 10th line using color 5 as the text color and color 6 as the background color starting at position 50 of the Window box and halting at position 0. Text will remain on the line until removed. Other Helpful Stuff There are switches in the raw file for every raw event that allow you to disable ircN's processing of that raw event for one trigger. To do this you set a variable %rawcode. then the raw code # to off. Example: To turn raw code 251 (/lusers reply) off for one trigger, you would put this line in your addon: set %rawcode.251 off This will tell ircN not to process the raw event this time, allowing your addon code to process it instead. But if you want to do make it not process the event several times you will have to set the variable for every time. There is a similar switch for the on 1:DNS event, to do this you set the variable %dnsevent to off. Information on other available variables is available in the variable section of this help file. Howto: Uninstall addons This is how to correctly uninstall your addon and leave no trace of its existence. using Popups: menu Channel { blah v1.0 .shutup ..on { set %blah.shutup on } ..- ..off { set %blah.shutup off } .- .Uninstall { unaddon2 blah.ad2 } } using an Alias: alias blah.uninstall unaddon2 blah.ad2 The Addon2 format The addon2 format is a new format for installing or uninstalling addons. One .ad2 file can be used to intelligently install or uninstall the addon with a single command, namely the /addon2 and /unaddon2 aliases. Note for AVER and CVAR*: == Ctrl-K (c == color) == Ctrl-U == Ctrl-R == Ctrl-B == Ctrl-O (cancel all control codes) [Addon] ;This header is required or the addon will not work. installtitle=Addon v1.5 installation ;This is the first line of text that appears in the installer window. It MUST be defined. installtext1=This is only a sample! ;This is the second line of text that appears in the installer window. It MUST be defined. installtext2=Do NOT install this! ;This is the third line of text that appears in the installer window. It MUST be defined, and NO OTHERS will be used. uninstalltitle=Addon v1.5 uninstallation ;This is the first line of text that appears in the uninstaller window. It MUST be defined. uninstalltext1=This was only a sample! ;This is the second line of text that appears in the uninstaller window. It MUST be defined. uninstalltext2=You shouldn't have installed this! ;This is the third line of text that appears in the uninstaller window. It MUST be defined, and NO OTHERS will be used. aver=[ Addon v1.5 ] ;This is what gets shown during an ADDON ctcp request or when typing /av oldver1=addonv14.ad2 ;This is an optional old version of the addon. This will simply be removed from %aver when you install oldver2=addonv13.ad2 ;If you use the same .ad2 filename for all versions of your addon, these are not needed. You can have as many of these as you want. badver1=addonv12.ad2 ;This is an optional bad version of the addon which requires an uninstall before reinstalling badver1.reason1=Please uninstall Addon v1.2 first! ;This is why the old version can not be installed badver1.reason2=Addon v1.2 is incompatible with v1.5 ;You can have as many of these lines as you want. badver2=addonv11.ad2 badver2.reason1=Please uninstall Addon v1.1 first! badver2.reason2=Addon v1.1 is incompatible with v1.5 badver3=addonv10.ad2 badver3.reason1=Please uninstall Addon v1.0 first! badver3.reason2=Addon v1.0 is incompatible with v1.5 badver4=othadn18.ad2 ;An alternate usage of this would be to prevent two addons badver4.reason1=Sorry! OtherAddon v1.8 is incompatible with Addon v1.5! ;from being installed at the same time, in case the addons badver4.reason2=Please uninstall OtherAddon v1.8 first. ;are known to conflict with each other. alreadyinstalled1=Error! Addon v1.5 is already installed! ;This gets displayed if you try to install the addon when it's alreadyinstalled2=Please uninstall first if you wish to reinstall. ;already installed. No limit to the amount of these lines. notinstalled1=Error! Addon v1.5 is not installed! ;This gets displayed if you try to uninstall the addon when it's notinstalled2=Please stop messing with the /unaddon2 command! ;not installed. No limit to the amount of these lines. script1=addon.mrc ;This is a SCRIPT file that gets loaded script2=addon2.mrc ;You can have as many of these as you want script3=addon3.mrc ;if all of the code doesn't fit in a single file. alias1=addon.als ;This is an ALIAS file that gets loaded alias2=addon2.als ;You can have as many of these as you want. newfile1=addon.ini ;This is a file that gets created upon installation. newfile2=addon2.ini ;You can have as many of these as you want var1=adnname.* ;The first VAR entry should be a wildcard mask which will match all variables set by the addon. var2=adnname.setting on ;The second VAR entry can also be a mask, or a variable name with a value following it. var3=adnname.setting2 off ;You can have as many of these as you want, but do NOT put bold/underline/color/reverse characters in these variables, cvar1=adnname.version [ 12Addon v1.5 ] ;That's what CVAR entries are for. cvar2=adnname.logo [12Addon] ;You can have as many of these entries as you want. installed1=Addon v1.5 is now installed! ;This gets displayed when the addon finishes installing. installed2=Type /addon.help for help. ;As does this line installed3=Type /addon.uni to uninstall. ;You can have as many of these lines as you want. uninstalled1=Addon v1.5 is now uninstalled. ;This gets displayed when the addon finishes uninstalling uninstalled2=Thank you for using Addon v1.5 ;Same here ;You can have as many of these lines as you want. Basically, everything except INSTALLTEXT* and UNINSTALLTEXT* can have as many lines as you want. INSTALLTEXT and UNINSTALLTEXT are limited to 2 lines. BLANK SAMPLE [Addon] installtitle= installtext1= installtext2= uninstalltitle= uninstalltext1= uninstalltext2= aver= oldver1= badver1= badver1.reason1= badver1.reason2= alreadyinstalled1= alreadyinstalled2= notinstalled1= notinstalled2= script1= alias1= newfile1= var1= var2= cvar1= installed1= installed2= installed3= uninstalled1= uninstalled2= uninstalled3= Sample ad2 [Addon] installtitle=Addon v1.5 installation installtext1=This is only a sample! installtext2=Do NOT install this! uninstalltitle=Addon v1.5 uninstallation uninstalltext1=This was only a sample! uninstalltext2=You shouldn't have installed this! aver=[ Addon v1.5 ] oldver1=addon13.ad2 oldver2=addon14.ad2 badver1=addon12.ad2 badver1.reason1=Please uninstall Addon v1.2 first! badver1.reason2=Addon v1.2 is incompatible with v1.5 badver2=addon11.ad2 badver2.reason1=Please uninstall Addon v1.1 first! badver2.reason2=Addon v1.1 is incompatible with v1.5 badver3=OtherAddon18.ad2 badver3.reason1=Sorry! OtherAddon v1.8 is incompatible with Addon v1.5! badver4.reason2=Please uninstall OtherAddon v1.8 first. alreadyinstalled1=Error! Addon v1.5 is already installed! alreadyinstalled2=Please uninstall first if you wish to reinstall. notinstalled1=Error! Addon v1.5 is not installed! notinstalled2=Please stop messing with the /unaddon2 command! script1=addon.mrc script2=addon2.mrc script3=addon3.mrc alias1=addon.als alias2=addon2.als newfile1=addon.ini newfile2=addon2.ini var1=adnname.* var2=adnname.setting on var3=adnname.setting2 off cvar1=adnname.version [ 12Addon v1.5 ] cvar2=adnname.logo [12Addon] installed1=Addon v1.5 is now installed! installed2=Type /addon.help for help. installed3=Type /addon.uni to uninstall. uninstalled1=Addon v1.5 is now uninstalled. uninstalled2=Thank you for using Addon v1.5