![]()
This is just a place where I have put up a whole bunch of short script lines or aliases that I have toyed with over the years. Remember that some scripts wrap lines on this page when in the Remotes file they must stay on one line.
I have tried to make the colour codes allow you to follow the help by having Aliases in green ( if there are any ). Lines that need to be typed in an Edit box, but which are not aliases are in Blue. The lines of Script are in yellow, references in the help following are in white, and highlights in red. Every time a script that can be used is shown, it is preceded by the word SCRIPT.
No Contents yet until
the page is finished.
1. DCC file received info echo
2. DCC chat has opened echo
3. Title Bar information about yourself
4. Get your Nickname back as soon as it's free
5. Funny message on being DeOp'd
6. Funny reply to receiving an Invite
7. Custom CTCP funny replies
8. Fake PING replies with lots of twists
9. /Userhost and /UserIP command used effectively
10. Faster port on your Server (3/Jan/2001)
11. Custom Kick and Ban messages
12. Someone passing nicknames out of your busy channel?
13. URL and description catcher.
14. Acronym Expander and Acronym file.
15. Whois to custom window.
16. Random colour to first letter of sentence.
17. Echo to all open windows.
18. Close all open query windows.
1. File received/sent by DCC information.
Here is a simple line that echo's to your status window some details of a file received.
SCRIPT
on 1:filercvd:*:/echo 5 -s Received $filename of length
$lof($filename) from $nick at $get(1).cps cps
Says something like this:
Received c:\mirc\mirc541\download\mirc.ini of length 5988 from
nickname1 at 374 cps ![]()
SCRIPT
on 1:filesent:*:/echo 5 -s Sent $filename of length
$lof($filename) to $nick
Says something like this:
Sent c:\mirc\mirc541\download\mirc.ini of length 5988 to nickname1
2. DCC Chat opened warning.
Sometimes you initiate a DCC chat to someone and then get on with you life. Finally they accept it and you want to know. These are simple methods to do it. The first just says in Red in your status window DCC CHAT OPENED with Nickname.
SCRIPT
on 1:open:=:/echo 4 -s DCC CHAT OPENED with $nick
You can add in a welcome message as well like this.
SCRIPT
on 1:open:=:/echo 4 -s DCC CHAT OPENED with $nick | msg
=$nick Hiya $nick $+ , thank god we are finally connected.
This one says that and also plays a wav file. You must put in your own wav file name.
SCRIPT
on 1:open:=:/echo 4 -s DCC CHAT OPENED with $nick | splay
filename.wav
3. Information of yourself in the Title Bar.
ALIAS
TitleBarInfo .timerTitle 0 1 titlebar v $+ $version $me $usermode
$remove($address($me,1),*!*) $ip $remove($server,.undernet.org) $port $!time
It gives this information in the Title Bar at the top of your mIRC window including the current time.
mIRC-Version YourNick +i user@host Numeircal-IP Undernet-Server Server-Port Current-Time
4. Get back your nick the second it is free.
You need to have your favourite nickname (FavNick) in your notify file and your notify turned on.
SCRIPT
on 1:UNOTIFY:if ($nick == FavNick) { nick FavNick }
This is useful sometimes, but can get irritating if you change your nickname away from your FavNick for any reason. It soon changes your nick back to this favourite one which can drive you crazy.
Similarly get your nick back if you've been unexpectedly disconnected and your Ghost is still around.
SCRIPT
on 1:quit:if ($nick == FavNick) { nick FavNick }
5. Someone DeOps you and you send them a funny message.
SCRIPT
on 1!:DEOP:#: if ($opnick == $me) { msg $nick Hey - watch it
! Any more of that and ....... }
6. Someone Invites you using the /invite command and you message them back.
SCRIPT
on 1:INVITE:#:/msg $nick Now -why- would I want to go to
$chan ?
Here you send the message and give yourself a warning too.
SCRIPT
on 1:INVITE:#:/msg $nick Now -why- would I want to go to
$chan ? | /echo 4 $active -= $nick is inviting to $chan =-
7. Some silly custom replies to CTCP messages.
SCRIPT
ctcp 1:USERINFO: { raw -q notice $nick : $+ $chr(1) $+
USERINFO $me is $me $+ , what more do you want? $+ $chr(1) | halt }
SCRIPT
ctcp 1:CLIENTINFO: { raw -q notice $nick : $+ $chr(1) $+
CLIENTINFO $me does not like your inquisitiveness $+ , besides, I ain't no client of
yours. $+ $chr(1) | halt }
SCRIPT
ctcp 1:FINGER: { raw -q notice $nick : $+ $chr(1) $+ FINGER
$me does not like your finger $+ , please stick it up your own. $+ $chr(1) | halt }
SCRIPT
ctcp 1:VERSION: { raw -q notice $nick : $+ $chr(1) $+ VERSION
mIRC32 downgraded to v1.01 K.Mardam-Bey $+ $chr(1) }
SCRIPT
ctcp 1:GENDER: { raw -q notice $nick : $+ $chr(1) $+ GENDER
$me is $me $+ , but I'm not sure. Do you want me to check ? $+ $chr(1) | halt }
SCRIPT
ctcp 1:HELP: { raw -q notice $nick : $+ $chr(1) $+ HELP $me
thinks $me needs more help than you. Sorry. $+ $chr(1) | halt | }
SCRIPT
ctcp 1:IQ: { raw -q notice $nick : $+ $chr(1) $+ HMmmfffffff
$me has an IQ of only 299½ - - - I lost a ¼ point for knowing you ! & another ¼
point from being online non stop for 48 hours! $+ $chr(1) | halt }
SCRIPT
ctcp 1:AGE: { raw -q notice $nick : $+ $chr(1) $+ HELP $me is
way too old to let out his age in public $+ $chr(1) | halt }
8. The infamous fake Ping reply ! With quite a few twists.
Without resorting to user levels, put in your friends Nicknames in place of Nick1 Nick2 Nick3, they will get the real Ping reply, and a nice notice. Any users in your Remotes Users List will get a real Ping reply, but a different notice. Users on a common channel with you get a third notice and a fake Ping reply . Those in a message box, DCC chat window, Getting a file from you, Sending a file to you, all get different stuff and a fake reply. And those not on a channel with you get the worst notice and also a fake Ping reply.
SCRIPT
ctcp ^1!:PING: {
set %realping $ctime - $2
%fakeping = $ctime - 20
if ((Nick1 isin $nick) || (Nick2 isin $nick) || (Nick3 isin $nick)) {
notice $nick ping? Hi friend, you are entitled to my real PING reply!
goto end
}
if $ulist($address($nick,3),*,1) != $null) {
notice $nick ping? So, lucky devil, you are on my users list. Here's my Real ping reply!
goto end
}
if $comchan($nick,0) > 0) {
notice $nick Just cause your on the same channel with me doesn't mean you can play with my
ping.
goto notice
}
if ($chat($nick) != $null) {
notice $nick A ping in the DCC Chat window doesn't show the correct Lag time.
goto notice
}
if ($query($nick) != $null) {
notice $nick I don't like being pinged from a message window, sorry.
goto notice
}
if ($get($nick) != $null) {
notice $nick Just cause I'm getting a file from you doesn't mean you can Ping me.
goto notice
}
if ($send($nick) != $null) {
notice $nick Just cause you're sending me a file doesn't mean you can Ping me.
goto notice
}
notice $nick ping? Hmmm! ...go play with you own ping - please leave mine alone !
:notice
raw -q notice $nick : $+ $chr(1) $+ PING %fakeping $+ $chr(1)
halt
:end
}
9. Using the /userhost command effectively
Here is a cool way of using the /userhost nickname command anywhere to get info on a person's address. Very useful when the person is not on the same channel as you and is not in your IAL.
SCRIPT
raw 302:*: {
set %nps.addr $gettok($2,2,61)
set %nps.away $iif($left(%nps.addr,1) == +,Not Away,Away)
set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1))
if ($left(%nps.addr,1) == ~) {
set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1))
}
set %nps.mask $gettok($2,1,61) $+ ! $+ %nps.addr
echo 4 -a $gettok($2,1,61) from2 %nps.addr 4is currently2 %nps.away 4
- his addresses are2 $mask(%nps.mask,3) 4or2 $mask(%nps.mask,4)
halt
}
Use the following variables in your aliases or remotes if you need them:
%nps.addr user@host
%nps.mask Nick!user@host
%nps.away Away or Not Away
Will give you a line like:
Free from user@csh026.emirates.net.ae
is currently Not Away - his addresses are *!*user@*.emirates.net.ae or *!*@*.emirates.net.ae
Fortunately the much unused command /userip nickname can use the exact same format. Only the RAW reply changes from 302 to 307:
SCRIPT
raw 307:*: {
set %nps.addr $gettok($2,2,61)
set %nps.away $iif($left(%nps.addr,1) == +,Not Away,Away)
set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1))
if ($left(%nps.addr,1) == ~) {
set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1))
}
set %nps.mask $gettok($2,1,61) $+ ! $+ %nps.addr
echo 4 -a $gettok($2,1,61) from2 %nps.addr 4is currently2 %nps.away 4
- his addresses are2 $mask(%nps.mask,3) 4or2 $mask(%nps.mask,4)
halt
}
Again you can use the following variables in your aliases or remotes if you need them:
%nps.addr user@host
%nps.mask Nick!user@host
%nps.away Away or Not Away
Will give you a line like:
Free from user@194.170.124.26 is
currently Not Away - his addresses are *!*user@194.170.124.*
or *!*@194.170.124.*
This time in the numerical IP format.
10. Find the fastest Port on your server !
The syntax on servers changed sometime while i wasn't looking. Thus the little update
here posted 3/Dec/2001
new format to get the ports is /stats p
A nifty little Script that all goes in your Remotes files. Scans for the least busy port, lists them all for you in order of least busy to most busy in a nice custom window, allows you to switch onto it with a simple double click of your mouse ! Also added in an option to use a popup to rejoin the same channels you were on just before changing ports. Anyone knows a way of putting them back into the same exact position they were in as well, I'd love to hear the way !
SCRIPT
menu menubar {
ServerPorts:ServerPorts
}
SCRIPT
alias ServerPorts {
set %server.Port.for.Popup.menu $server
.enable #ServerPorts
if ($window(@Server-Ports) != $null) { window -c @Server-Ports }
window -l13besS @Server-Ports 120 100 400 185 @Server-Ports MS Serif 11
titlebar @server-ports Ports in order of Best to worst
echo @Server-Ports 4=[ 2Scanning visible ports on 6 $server $+
4 ]=
unset %ServerPortsScan
; stats l
stats P
}
SCRIPT
menu @Server-Ports {
dclick {
server %server.Port.for.Popup.menu $strip($gettok($line(@Server-Ports,$$1),3,32))
}
Switch Ports:server %server.Port.for.Popup.menu
$strip($gettok($line(@Server-Ports,$sline(@Server-Ports,1).ln,1),3,32))
Switch and rejoin Channels:{
set %server.Port.Channels.Total $chan(0)
unset %server.Port.Channels
:ServerChannels
if (%server.Port.Channels.Total != 0) {
set %server.Port.Channels %server.Port.Channels $chan(%server.Port.Channels.Total)
dec %server.Port.Channels.Total 1
goto ServerChannels
}
.enable #serverPortConnect
server %server.Port.for.Popup.menu
$strip($gettok($line(@Server-Ports,$sline(@Server-Ports,1).ln,1),3,32))
}
}
SCRIPT
#serverPortConnect off
on 1:connect:{
.disable #serverPortConnect
:ServerChannelsJoin
if (%server.Port.Channels != $null) {
set %server.Port.Channels $replace(%server.Port.Channels,$chr(32),$chr(44))
join %server.Port.Channels
}
}
#serverPortConnect end
SCRIPT
#ServerPorts off
raw 217:* {
set %ServerPort $3
if (%ServerPort == $port) { aline -l 4 @Server-Ports $str($chr(160),$calc(14 - $len($4)))
$+ $4 Port %ServerPort }
else { aline -l @Server-Ports $str($chr(160),$calc(14 - $len($4))) $+ $4 Port %ServerPort
}
}
; The lines below can be removed as the syntax of the IRC servers has been changed
; raw 211:* {
; if ($2 == $server) { set %ServerPort 6667 } | else { set %ServerPort
$left(4,$right(5,$2)) }
; if ((%ServerPort isnum) && ($chr(46) !isin %ServerPort)) {
; if (%ServerPortsScan == $null) {
; set %ServerPortsBest %ServerPort | set %ServerPortsTraffic $5 + $7
; set %ServerPortsScan active | set %ServerPortsList %ServerPort
; }
; else {
; set %ServerPortsListAll %ServerPortsList
; set %ServerPortsList %ServerPortsListAll $+ , $+ %ServerPort
; set %ServerPortsSum $5 + $7
; if (%ServerPortsSum < %ServerPortsTraffic) {
; set %ServerPortsBest %ServerPort
; set %ServerPortsTraffic $5 + $7
; set %ServerPortsListAll %ServerPortsList
; unset %ServerPortsListAll
; }
; unset %ServerPortsSum
; }
; if (%ServerPort == 6667) {
; aline -l 3 @Server-Ports $str($chr(160),$calc(14 - $len($calc($5 + $7)))) $+ $calc($5 +
$7) Port %ServerPort
; }
; elseif (%ServerPort == $port) {
; aline -l 4 @Server-Ports $str($chr(160),$calc(14 - $len($calc($5 + $7)))) $+ $calc($5 +
$7) Port %ServerPort
; }
; else {
; aline -l @Server-Ports $str($chr(160),$calc(14 - $len($calc($5 + $7)))) $+ $calc($5 +
$7) Port %ServerPort
; }
; }
; halt
; }
raw 219:*: {
; if ($2 == l) {
if ($2 == End) {
echo @Server-Ports 2 All available ports :3 %ServerPortsList
echo @Server-Ports 2Best port is: 3 %ServerPortsBest
echo @Server-Ports 2Best port traffic: 3 %ServerPortsTraffic Kilobytes
echo @Server-Ports 4=[2Finished Server scan ports on 6 $server $+
4]=
echo @Server-Ports 2You are now connected to Port6 $port
echo @Server-Ports 5Double Click the Port in the List Box
echo @Server-Ports 5to Switch to that Port
unset %ServerPortsList | unset %ServerPortsScan | unset %ServerPortsTraffic
unset %ServerPort | /.timer 1 20 /unset %ServerPortsBest | unset %ServerPortsListAll
.timer 1 1 /.disable #ServerPorts | halt
}
}
#ServerPorts end
Get the File right here - serverports.mrc or press the button below.
11. Want your own custom kick and ban messages ?
Have all your custom kick and ban messages handy. This Script all goes in your Remotes files. It always bans the person before kicking them, so you don't have to worry about a re-join before the ban takes effect.
SCRIPT
menu channel {
Kicker
.X,W Bans
..Ban using X with frills:/msg X ban # $snicks 3 $?="Duration (hours)"
$?="Level" $?="Reason" | .timer 1 5 .msg x kick # $snicks
$?="Reason"
..Ban using W with frills:/msg W ban # $snicks 3 $?="Duration (hours)"
$?="Level" $?="Reason" | .timer 1 5 .msg w kick # $snicks
$?="Reason"
.BANS a whole bunch
..1 hrs Kick, Ban /w reason : onehourban
..20 hrs Kick, Ban /w reason :longban
..Reason Kick:/kick # $$* $$?="Enter Reason"
..Swear Kick/Ban:/swearkick
..Bad Mask Kick/Ban:/baduserhostkick
..Repeat Kick/Ban:/repeatban.
..1-10 min bans
...1 min kick/ban:/oneminban
...2 min kick/ban:/twominban
...3:/threeminban
...4:/fourminban
...5:/fiveminban
...10:/tenminban
..Timed Ban: timedban
..Sweetkick:sweetkick
..Sweetkickban:Sweetkickban
..SweetERrkickban:Sweeterkickban
..SweetESTkickban:Sweetestkickban
}
SCRIPT
alias timedban set %ban $?="Seconds For Ban" | ban
-u $+ %ban $snicks 3 | kick # $snicks ((Banned For %ban Seconds)) | unset %ban
alias /swearkick /ban -u1800 $snicks 3 | timer 1 5 /kick # $snicks Mind your language -
you're mom's listening
alias /baduserhostkick -u1800 $snicks 3 | timer 1 5 /kick $snicks Grow up and change your
user@host
alias /repeatban /ban -u1800 $snicks 3 | timer 1 5 /kick $snicks Quit repeating repeating
repeating repeating ...
alias /oneminban set -u30 %bannick $snicks | set -u30 %minban 1 | set %banchan # | minban
alias /twominban set -u30 %bannick $snicks | set -u30 %minban 2 | set %banchan # | minban
alias /threeminban set -u30 %bannick $snicks | set -u30 %minban 3 | set %banchan # |
minban
alias /fourminban set -u30 %bannick $snicks | set -u30 %minban 4 | set %banchan # | minban
alias /fiveminban set -u30 %bannick $snicks | set -u30 %minban 5 | set %banchan # | minban
alias /tenminban set -u30 %bannick $snicks | set -u30 %minban 10 | set %banchan # | minban
alias /onehourban set -u30 %bannick $snicks | set -u30 %minban 60 | set %banchan # |
hourban
alias /longban set -u30 %bannick $snicks | set -u30 %minban 1200 | set %banchan # |
hourban
alias /minban set %kickreason $+ %bannick $+ : $?="Reason for %minban
minutes ban" | set -u30 %kickreason %kickreason : Enjoy your %minban minute ban | set
-u30 %secban $calc(%minban * 60) | ban -u $+ %secban %bannick 3 | timer 1 5 /kick %banchan
%bannick %kickreason | unset %kickreason %minban %secban %bannick %banchan
alias /hourban set %kickreason $+ %bannick $+ : $?="Reason for
$calc(%minban / 60) hour ban" | set -u30 %kickreason %kickreason : Enjoy your
$calc(%minban /60) hour ban | set -u30 %secban $calc(%minban * 60) | ban -u $+ %secban
%bannick 3 | timer 1 5 /kick %banchan %bannick %kickreason | unset %kickreason %minban
%secban %bannick %banchan
alias /Sweetkick /me looks over and notices $snicks | timer 1 3 /me smiles and beckons
$snicks over and whispers in $snicks $+ 's ear | timer 1 7 /say you're out of here, lamer.
| timer 1 9 kick # $snicks Bya Baby
alias /Sweetkickban /.timer 1 6 /ban -u3600 $snicks 3 | /me looks over and notices $snicks
| .timer 1 2 /me smiles and beckons $snicks over and whispers in $snicks $+ 's ear |
.timer 1 5 /say you're out of here, lamer. | .timer 1 10 kick # $snicks Bya Baby
alias /SweetERkickban /.timer 1 6 /ban -u3600 $snicks 3 | /me sighs and wonders why people
like $snicks exist in this world | .timer 1 2 /me points his finger at $snicks | .timer 1
5 /me removes $snicks totally from his thoughts and his mind | .timer 1 10 kick # $snicks
** poof** and removes $snicks from the channel just as easily
alias /SweetESTkickban /.timer 1 6 /ban -u3600 $snicks 3 | /me throws his hands up in
exasperation | .timer 1 2 /me wonders why people abuse our hospitality in the channel to
such an extent they need to be ejected | .timer 1 5 /me grabs $snicks by the hair and
swings him out da door | .timer 1 10 kick # $snicks $me looks in his hand and sees $snicks
$+ 's toupee still there! | .timer 1 13 me tosses $snicks $+ 's hairpiece out da door too
:) | .timer 1 13 .notice $snicks tosses $snicks $+ 's hairpiece out da door too :)
Get the File right here - kicker.mrc
12. Someone passing nicknames out of your busy channel?
Find them using this handy little scanner of matching nicknames.
nps stands for Nick Pass Scanner
and was written by me for Paul^^ on Undernet's #funfactory.
I did it on Aug 15 1998 and modified it again on Sep 2 1998
You enter either an IP address with or without the preceding *!*
or enter a nickname which may or may not be present in the IAL
THIS MUST BE LOADED as a SCRIPT FILE
You receive back people with the same user@host and the people on the same @domain in a
Custom window called @spy which has it's own cute little popup :)
SCRIPT
on 1:open:?:if ($comchan($nick,0) == 0) { .enable #spy |
userhost $nick }
SCRIPT
#spy off
raw 302:*: haltdef | set %nps.addr $gettok($2,2,43)
set %nps.away $iif($left(%nps.addr,1) == +,Not Away,Away)
set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1))
if ($left(%nps.addr,1) == ~) { set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1)) }
set %nps.mask $gettok($2,1,61) $+ ! $+ %nps.addr
echo 4 -a $gettok($2,1,61) from2 %nps.addr 4is currently2 %nps.away
4and is not on any channels as me. Do a Spy check on him - his addresses are2
$mask(%nps.mask,3) 4or2 $mask(%nps.mask,4)
.disable #spy | halt
#spy end
SCRIPT
#spyNick on
raw 401:*: echo 6 -a No such nickname :( | haltdef
raw 302:*: haltdef | set %nps.addr $gettok($2,2,43)
set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1))
if ($left(%nps.addr,1) == ~) { set %nps.addr $right(%nps.addr,$calc($len(%nps.addr) -1)) }
set %nps.mask $gettok($2,1,61) $+ ! $+ %nps.addr | set %nps.IP $mask(%nps.mask,3)
set %nps.Domain $mask(%nps.mask,4) | .disable #spyNick | spynick
#spyNick end
SCRIPT
alias spy {
:spyStartAgain
set %nps.IP $?="Enter IP address to scan"
if (%nps.IP != $null) {
if ($left(%nps.IP,3) != *!*) { set %nps.IP *!* $+ %nps.IP }
if (@ !isin %nps.IP) {
set %nps.IP $left(%nps.IP,3) $+ @ $+ $right(%nps.IP,$calc($len(%nps.IP) - 3))
if ($?!="The IP you entered needs a @ in it. $crlf $+ Is this the right way ? $crlf
$+ %nps.IP ") {
} | else { goto spyStartAgain }
}
set %nps.Domain $mask(%nps.IP,4)
}
if (%nps.IP == $null) {
set %nps.nick $?="Enter Nickname to scan"
set %nps.IP %nps.nick
if (%nps.IP != $null) {
set %nps.Domain $address(%nps.IP,4) | set %nps.IP $address(%nps.IP,3)
if ((%nps.Domain == $null) || (%nps.IP == $null)) {
.enable #spynick | userhost %nps.nick | halt
}
}
}
if (%nps.IP == $null) { echo 6 -a You didn't enter anyone to scan :P } | else { spyNick }
}
SCRIPT
alias spyNick {
if (%nps.IP != $null) {
set %nps.IP.Number $ial(%nps.IP,0)
set %nps.Domain.Number $ial(%nps.Domain,0)
if (%nps.IP.Number = 0) {
echo 2 -a No one matching the IP %nps.IP in your IAL now | halt
}
set %nps.count 1
set %nps.IP.Echo $true
unset %nps.IP.ALL | unset %nps.Domain.ALL | unset %nps.IP.ALL.List | unset
%nps.Domain.ALL.List
:checkingIAL
set %nps.IP.ALL.List %nps.IP.ALL.List -- &&& -- $ial(%nps.IP,%nps.count)
set %nps.Domain.ALL.List %nps.Domain.ALL.List -- &&& --
$ial(%nps.Domain,%nps.count)
if ($window(@Spy) == $null) {
window -l @Spy 1 93 325 176 @Spy MS Serif 11 | /titlebar @spy Red = perfect Match
}
if ($ial(%nps.IP,%nps.count) != $null) { aline 4 @spy $ial(%nps.IP,%nps.count) }
if (($ial(%nps.Domain,%nps.count) != $null) && ($ial(%nps.IP,%nps.count) ==
$null)) { aline 5 @Spy $ial(%nps.Domain,%nps.count) }
inc %nps.count
if ((%nps.count > %nps.IP.Number) && (%nps.IP.Echo)) {
set %nps.IP.Echo $false
if (%nps.IP.Number == 1) {
echo 4 -s There is %nps.IP.Number person in your IAL matching %nps.IP and they are
%nps.IP.ALL.List
}
else { echo 4 -s There are %nps.IP.Number people in your IAL matching %nps.IP and they are
%nps.IP.ALL.List }
}
if (%nps.count <= %nps.Domain.Number) { goto checkingIAL } | else {
if (%nps.Domain.Number == 1) {
echo 9 -s There is %nps.Domain.Number person in your IAL matching Domain %nps.Domain and
they are %nps.Domain.ALL.List | aline 1 @Spy ********* END *********** | halt }
else { echo 9 -s There are %nps.Domain.Number people in your IAL matching Domain
%nps.Domain and they are %nps.Domain.ALL.List | aline 1 @Spy ********* END ***********
halt
}
}
}
echo 6 -a No Such nickname, sorry ! :P
}
SCRIPT
menu @spy {
dclick whois $strip($gettok($line($active,$$1),1,33)) | echo 3 -s WHOIS $line($active,$$1)
Spy Pops
.Kick $strip($gettok($line($active,$sline($active,1).ln),1,33)) from
$comchan($strip($gettok($line($active,$sline($active,1).ln),1,33)),1) :kick
$comchan($strip($gettok($line($active,$sline($active,1).ln),1,33)),1)
$strip($gettok($line($active,$sline($active,1).ln),1,33)) This is a preventive kick for
suspected Nick Passing
.Ban $strip($gettok($line($active,$sline($active,1).ln),1,33)) in
$comchan($strip($gettok($line($active,$sline($active,1).ln),1,33)),1) :ban
$comchan($strip($gettok($line($active,$sline($active,1).ln),1,33)),1)
$strip($gettok($line($active,$sline($active,1).ln),1,33)) 3
.Ban and Kick $strip($gettok($line($active,$sline($active,1).ln),1,33)) from
$comchan($strip($gettok($line($active,$sline($active,1).ln),1,33)),1) :ban
$comchan($strip($gettok($line($active,$sline($active,1).ln),1,33)),1)
$strip($gettok($line($active,$sline($active,1).ln),1,33)) 3 | timer 1 5 kick
$comchan($strip($gettok($line($active,$sline($active,1).ln),1,33)),1)
$strip($gettok($line($active,$sline($active,1).ln),1,33)) This is a preventive kick for
suspected Nick Passing
.Query $strip($gettok($line($active,$sline($active,1).ln),1,33)) :/query
$strip($gettok($line($active,$sline($active,1).ln),1,33))
.Entry Options:{
aline @spy 6============================================
aline @spy 14Enter an 4IP14 address or 4Nick14name to scan
aline @spy 14The IP address can be in the forms
aline @spy 2*!*user@host.domain 14OR2 user@host.domain
aline @spy 2*!*@host.domain 14OR2 @host.domain
aline @spy 2*!*host.domain 14OR2 host.domain OR *domain
aline @spy 14If the IP address is blank a Nickname entry field comes up next.
aline @spy 6============================================
}
}
Get the File right here - spy.mrc
13. URL and description catcher.
Here is a short cute line that I made up in #mIRC for someone. It logs URL's and the
comment that follows the URL so that a description can also be captured. These are written
to a file called url.txt , so for example if someone says:
Check out this url
http://www.fortunecity.com/skyscraper/mozilla/469/scripts.html which is a good place to
start learning scripts, then what will be written to the file will be just:
http://www.fortunecity.com/skyscraper/mozilla/469/scripts.html which is a good place to start learning scripts
SCRIPT
on 1:text:*http*:#:write url.txt $right($1-,$calc(1 +
$len($1-) - $pos($1-,http)))
14. Acronym Expander and Acronym file.
This Acronym Expander can be a lot of fun. The Script is short and sweet. But the acronym-complete.txt file is AWESOME. It was collected over the last year, and took a lot of work to weed out the doubles. Have fun with it. Remember to Use the Popup Under the Command Section ( at the top of your screen ) to add in your new Acronyms.
SCRIPT
on 1:text:!acr*:*:{
set %acro $2
if (%acro != $null) {
set %acronym $read -s $+ $2 acronym-complete.txt
if (%acronym != $null) { msg $chan Acronym Expander $2 = %acronym }
else { /msg $chan I dont have $2 in my list - care to give me one for that ? }
}
else { /msg $chan You must enter an acronym for me to expand silly :| }
}
ALIAS
/acr {
set %acro $$1
if (%acro != $null) {
set %acronym $read -s $+ %acro c:\mirc\acronym-complete.txt
if (%acronym != $null) { echo $chan 2Acronym Expander $2 = %acronym }
else { /echo $chan 3I dont have %acro in my list - care to give me one
for that ? }
}
else { /echo $chan 2You must enter an acronym for me to expand silly :| }
}
Download the huge Acronym Expander Text file (press SHIFT and click the link) and place it in the same directory as your mirc exe file.
15. Whois to custom window.
Even though the v5.41 sends a /whois to the active window now, it is still useful to have it go to a custom window. Here is something that puts /whois , into a custom window with it's own popups.
SCRIPT
#boxwhois off
raw 311:* {
if ($window(@Whois) == $null) { window -l @Whois 397 183 232 176 @Whois Ariel 11
}
else { clear @Whois }
aline 4 @Whois Whois Reply for $2 $+
aline @Whois Nick: $parm2
aline @Whois Address: ( $+ $3 $+ @ $+ $4 $+ )
aline @Whois IRC Name: $6-
}
raw 319:* { aline @whois Channels: $3- }
raw 312:* { aline @Whois Server: $3 }
raw 301:* {
aline @Whois $+ $2 is away
aline @Whois Reason: $3-
}
raw 313:* {
aline @Whois - WARNING&127 - IRCop Detected!
}
raw 317:* { aline @Whois Idle Time: $duration($3) }
raw 401:* { echo 4 -a No such nickname }
raw 318:* { aline 4 @Whois End of Whois for $2 $+ }
#boxwhois end
16. Random colour to first letter of sentence.
Make the first letter of your sentence a random colour. Again someone asked me for that !
SCRIPT
on 1:input:#:if (($left($1,1) isnum) || ($left($1,1) isletter)) {
msg $active ^K $+ $rand(1,15) $+ $left($1,1) $+ ^K $+ $right($1,$calc($len($1) - 1)) $2- |
halt }
So if you typed this in a channel say 3 times
Hi there everybody
You would see this:
Hi there everybody
Hi there everybody
Hi there everybody
17. Echo to all open windows.
Someone asked me if he could echo to all open windows. I thought that was neat. So here is the way.
ALIAS
/echoall {
set %echo.chan $chan(0) | set %echo.query $query(0) | set %echo.chat $chat(0) | set
%echo.window $window(0)
:echoall
if (%echo.chan != 0) { if ($1 isnum) { echo $1 $chan(%echo.chan) $2- } | else { echo
$chan(%echo.chan) $1- } | dec %echo.chan 1 }
if (%echo.query != 0) { if ($1 isnum) { echo $1 $query(%echo.query) $2- } | else { echo
$query(%echo.query) $1- } | dec %echo.query 1 }
if (%echo.chat != 0) { if ($1 isnum) { echo $1 = $+ $chat(%echo.chat) $2- } | else { echo
= $+ $chat(%echo.chat) $1- } | dec %echo.chat 1 }
if (%echo.window != 0) { if ($1 isnum) { echo $1 $window(%echo.window) $2- } | else { echo
$window(%echo.window) $1- } | dec %echo.window 1 }
if ((%echo.chan != 0) || (%echo.query != 0) || (%echo.chat != 0) || (%echo.window != 0)) {
goto echoall }
else { unset %echo.* }
}
18. Close all open query windows.
And Tag` came to mIRC and asked if all query (message) windows could be closed with one command. Wasn't difficult to do ..... so here .....
ALIAS
/closequery {
set %close.query $query(0) | :echoall
if (%close.query != 0) { closemsg $query(%close.query) | dec %close.query 1 }
if (%close.query != 0) { goto echoall }
else { unset %close.query }
}
19. List out all your open windows.
Safire asked for this one. Shows all your windows (except the Status Window).
ALIAS
/whatisopen {
unset %w.o.* | set %w.o.ch $chan(0) | set %w.o.q $query(0) | set %w.o.ct $chat(0) | set
%w.o.w $window(0)
:w.o
if (%w.o.ch != 0) { set %w.o.ch.all %w.o.ch.all $chan(%w.o.ch) | dec %w.o.ch }
if (%w.o.q != 0) { set %w.o.q.all %w.o.q.all $query(%w.o.q) | dec %w.o.q }
if (%w.o.ct != 0) { set %w.o.ct.all %w.o.ct.all $chat(%w.o.ct) | dec %w.o.ct }
if (%w.o.w != 0) { set %w.o.w.all %w.o.w.all $window(%w.o.w) | dec %w.o.w }
if ((%w.o.ch != 0) || (%w.o.q != 0) || (%w.o.ct != 0) || (%w.o.w != 0)) { goto w.o }
echo 4 -a $chr(3) $+ 2<Channels= $+ $chr(2) %w.o.ch.all $+ $chr(2) > $chr(3) $+
3<Messages= $+ $chr(2) %w.o.q.all $+ $chr(2) > $chr(3) $+ 5<Chats= $+ $chr(2)
%w.o.ct.all $+ $chr(2) > $chr(3) $+ 6<Custom Windows= $+ $chr(2) %w.o.w.all >
unset %w.o.*
}
20. Join your favourite channel.
This is how i join my favourite channel, with the alias /dubai
Of course you got to put in your correct password.
ALIAS
/dubai /join #dubai | /msg x@channels.undernet.org login #dubai PASSWORD | .timer 1 5
msg x op #dubai $me
21. Protection from kicks or bans in your own channel.
Here are the Remotes I use to protect myself in my home channel #dubai. Make the necessary changes.
SCRIPT
on 1:KICK:#dubai: {
if (( $nick == X ) && ( $knick == $me )) {
if ($1 === From) { set %k.t $2 }
else { set %k.t $remove($remove($1,$chr(40)),$chr(41)) }
msg x suspend $chan $address(%k.t,3) 30
msg x deop $chan %k.t
msg x kick $chan %k.t You kicked the wrong person %k.t
unset %k.t
}
elseif ($knick == $me) {
msg x suspend $chan $address($nick,3) 30
.msg x deop $chan $nick
.msg x kick $chan $nick You kicked the wrong person $nick
}
}
SCRIPT
on 1:BAN:#:{
if (($nick == $me) && ($me isop $chan) && ($banmask iswm $address($me,5)))
{ mode $chan -b $banmask | halt }
if ($banmask iswm $address($me,5)) {
mode $chan -bo $banmask $nick
if ($chan == #dubai) { msg x unban $chan $me | /msg x@channels.undernet.org login $chan PASSWORD | .timer 1 5
msg x suspend $chan $address($nick,3) 300 | .timer 1 8 msg x deop $chan $nick | .timer 1
10 msg x unban $chan $me | .timer 1 10 msg x invite $chan $me | halt }
}
}
22. Sentence too long check.
Ever found yourself typing away a huge long sentence in the Edit Box and found after pressing the enter key the person reading telling you the last few words are missing? This stops the length at 460, just below the max line length the IRC servers can handle.
SCRIPT
on 1:input:if ($len($1-) > 460) { echo 4 -a Line size is too long
- $len($1-) charachters | editbox -a $1- | halt }
23. Show Ops, Voiced, and other stuff of channel you've joined.
When you join a channel, it shows you how many people are Ops, How many are Voiced, How many are Normal, the mode of the channel, and the Channel Topic.
SCRIPT
on 1:join:#:if ($nick == $me) { set %darn $chan | .timer 1 5 //echo
2 -a +op= $!opnick(%darn,0) +v= $!vnick(%darn,0) users= $!nopnick(%darn,0) mode/ $+
$chan $+ = $!chan(%darn).mode Topic/ $+ $chan $+ = $!chan(%darn).topic }
24. Check lag time in DCC CHAT wondow.
Checking Lag time in a DCC window is a pain. If everyone had this line in their remotes file, life would be so easy! Just type PING in the chat window and PONG is the response.
SCRIPT
on 1:chat:*: if ($1- == ping) { msg =$nick PONG }
And if we wanted to get even more clever ...... if both sides have these:
SCRIPT
on 1:chat:ping*:{
if ($1- == ping) { msg =$nick PONG }
if ($2- isnum) { msg =$nick PONG $2 }
}
SCRIPT
on 1:chat:pong*:{
if (($1 == pong) && ($2- isnum)) { msg =$nick PONG received in
$duration($calc($ctime - $2)) }
}
SCRIPT
on 1:input:=:if ($1- == PING) { say PING $ctime | halt }
Just watch the fun!
25. Color OPs and Voiced as you join a channel.
How do you colour all the OP's red and Voiced brown in a channel when you join it. When I was asked for this one, I thought it would be a one minute job. Took much longer to get it right.
SCRIPT
on 1:join:#:if ($nick == $me) { set %scan.chan $chan | timer 1 0
highlight }
alias highlight {
if ($1 != $null) { set %scan.chan $1 }
set %scan.ops $opnick(%scan.chan,0)
set %scan.v $vnick(%scan.chan,0)
:scan.v
if (%scan.v > 0) { cline 12 %scan.chan $vnick(%scan.chan,%scan.v) | dec %scan.v 1 |
goto scan.v }
:scan.ops
if (%scan.ops > 0) { cline 4 %scan.chan $opnick(%scan.chan,%scan.ops) | dec %scan.ops 1
| goto scan.ops }
unset %scan.chan | unset %scan.ops | unset %scan.v
}
To the Index Top of this page I missed the aliases? Gimme easier scripts Back to Free's Home Page