; ; scripts.mrc ; ; Here's a small collection of some tiny convenient scripts that I've made. If you want to use any of ; them just copy the code below to mIRC's script editor (alt+r in mIRC) and it will load automatically. ; If it for some reason wont work go to the editor again and create a new script, file -> new, and put ; the code in this window. ; ; Please dont ask me any questions about any of this, if you cant figure it out maybe some of your ; friends can and if they're just as clueless as you are try your luck in #help.script instead. ; ; Enjoy :) ; ; -- ; Faile ; ; A replacement for the /away function in mIRC. This does the same thing but always adds the time and date ; when you set yourself away. Type /away to set yourself away with a reason and just /away ; to set yourself away without a reason, typing /away again will return you. alias away { if ($1 == $null) { if ($away) { .raw away | echo -a [ away ] you're back } else { .raw away :I'm away since $asctime | echo -a [ away ] you're away since $asctime } } else { .raw away :I'm away ( $+ $1- $+ ) since $asctime | echo -a [ away ] you're away ( $+ $1- $+ ) since $asctime } } ; A quick alias for deopping yourself if you'd want to do that. alias deopme { mode $chan -o $me } ; A small alias to see if you're lagging. Type /lag to ping yourself and see how long time it takes. alias lag { ctcp $me ping } ; Quick command for /mode, instead of typing /mode #channel +i you just have to type /m +i in the active ; channel. alias m { mode $chan $1- } ; Another version of the popular "I rule XXX peons in XXX channels!" script, just use $power anywhere in your ; script and it will return your power. Use //say $power in a channel to say how powerful you are. alias power { var %i = 1,%j,%k,%l while ($chan(%i)) { if ($me isop $chan(%i)) { set %k $calc(%k + $nick($chan(%i),0)) inc %j } set %l $calc(%l + $nick($chan(%i),0)) inc %i } return I rule %j damned crypts (of $chan(0) $+ ) and possess %k cursed souls (of %l $+ ). } ; Ban protection, if someone puts a ban that match your mask you will deop him and remove the ban immediatly ; and also get a message in your active window. on !@*:ban:#:{ if ($banmask iswm $address($me,5)) { mode $chan -bo $banmask $nick echo -a [ ban ] $nick banned you ( $+ $banmask $+ ) on $chan } } ; A nick completer for channels. If you type "aile: hi" and there's only one user on the channel that matches ; *aile* it will complete the nick, thus it will come as "Faile: hi" in the channel. If there are more than ; one user matching the nick it wont complete the nick because it cant guess who you meant the message for. on *:input:#:{ if ($right($1,1) == :) { var %i = 1,%j = $remove($1,:), %k, %l while (%i <= $nick($chan,0)) { if (%j isin $nick($chan,%i)) { set %k %i inc %l } inc %i } if (%l == 1) { msg $chan $nick($chan,%k) $+ : $2- haltdef } } } ; This script is only for QuakeNet. When O or Q sends you a notice it wont show up as a notice but go to a ; query instead so you wont be spammed by O or Q in your active window. Anything coming from O or Q that ; matches *broadcast* will still be displayed in your active window. on ^*:notice:*:?:{ if ($nick == o) { if (broadcast !isin $1-) { haltdef } if ($query(o) == $null) { query O } echo -t o $1- } elseif ($nick == q) { if (broadcast !isin $1-) { haltdef } if ($query(q) == $null) { query Q } echo -t q $1- } } ; Here's a cool thing, if someone says anything with your name in it on a channel it will appear in a little ; window of it's own so you can quickly see that someone mentioned you. on *:text:*:#:{ if ($me isin $1-) { if ($window($me) == $null) { window -k[0] @ $+ $me } echo -m @ $+ $me [[ $time / $date / $network / $chan ]] < $+ $nick $+ > $1- } } ; If you've set yourself to see server notices (+s) it might be annoying to get them in your active window ; all the time, this little script will log all server notices you receive to snotice.log in your mIRC ; directory and show them in a special window so you wont be disturbed by them. on ^*:snotice:*:{ haltdef if ($window(@snotice) == $null) { window -ek[0] @snotice } echo -t @snotice $1- write snotice.log [[ $date / $time ]] $1- } ; This script will give everyone that joins your channel or channels autovoice (+v) on join... on !@*:join:#channel:{ mode $chan +v $nick } ; ...and if you have more than one channel use this. on !@*:join:#channel,#channel2,#channel3:{ mode $chan +v $nick } ; This will change your CTCP replies to the things below, it's a good idea to use a modified mIRC together ; with this script if you want to trick people into thinking your a bot or something...includes floodprotection. ctcp ^*:*:*:{ if ((%ctcpflood == $null) || (%ctcpflood < 5)) { inc -u60 %ctcpflood if ($1 == version) { .ctcpreply $nick version eggdrop v1.6.8 } elseif ($1 == finger) { .ctcpreply $nick finger go away } elseif ($1 == ping) { .ctcpreply $nick ping pong you lamah } elseif ($1 == time) { .ctcpreply $nick time go stare at the sun } elseif ($1 == clientinfo) { .ctcpreply $nick clientinfo huh? clientinfo? what's that? } } } ; One of those lame ban enforcement scripts, place a ban and everyone matching gets kicked. ; Wont bother if you set the ban yourself, or it will never kick you. on !@*:ban:#:{ var %i = 1 while (%i <= $nick($chan,0)) { if (($banmask iswm $address($nick($chan,%i),5)) && ($nick($chan,%i) != $me)) { kick $chan $nick($chan,%i) banned by $nick } inc %i } } ; Deop protection, whenever someone deops someone a counter is set to 20 and decreased with 1 every second. ; If the counter reaches 60 (three deops) it will deop that person and tell the channel. on !@*:deop:#:{ if ((%deopflood [ $+ [ $chan ] $+ [ $address ] ] == $null) || (%deopflood [ $+ [ $chan ] $+ [ $address ] ] < 60)) { inc -z %deopflood $+ $chan $+ $address 20 } else { mode $chan -o $nick notice $chan !warning! deopflood detected from $nick ( $+ $fulladdress $+ ) } } ; A clonescanner that works when people join channels, shows the host and all the clones from it. ; Right now triggers if there are two or more people from the same host, which you can change by ; replacing the "2" below to something else, perhaps to a 5 or 10 to detect lots of clones. ; It wont kick clones or do anything about them, just tell you "look! clones!" and let you do the ; rest. on *:join:#:{ if ($ialchan($wildsite,$chan,0) >= 2) { var %i = 1, %j while (%i <= $ialchan($wildsite,$chan,0)) { set %j %j $ialchan($wildsite,$chan,%i).nick inc %i } echo -t $chan 4[ Clones ] $ialchan($wildsite,$chan,0) clones detected from $site $+ : %j } } ; More will come later, if you have an idea please tell me at faile@quakenet.org - I'd love to hear from you!