Template:mIRC Guide
The on notice event is triggered when mIRC receives a notice from a client on the server.
Synopsis
on <level>:NOTICE:<matchtext>:<target>:<commands>
Parameters
- <level>
- The access level required for the event to trigger.
- <matchtext>
- The text that must be matched for the event to trigger.
- <target>
- The target(s) of the notice that the event listens on. This can either be a *, or any combination of named channels, channel prefixes, ?, or a nickname that you are currently using - all separated by commas.
- <commands>
- The commands to be performed when the event is triggered.
Examples
Give a person "500 points" for sending a secret command:
on *:NOTICE:thesecretcommand:?:{
.notice $nick Congratulations! You have entered the secret command!
.notice $nick Please accept these free 500 points...
hinc -m $+(points.,$network) $wildsite 500
}
Op or deop a user with an access level of 5 on the channel they specify:
on 5:NOTICE:*op #*:?:{
if ($istok(op dop,$1,32)) {
if ($me !ison $2) { .notice $nick I am not on that channel. }
elseif ($me !isop $2) { .notice $nick I am not opped in that channel. }
else mode $2 $iif($1 == op,+o,-o) $nick
}
}
Automatically identify to most NickServ services if your current nickname is TheUsualNick:
on *:NOTICE:This nickname is registered*:TheUsualNick:{
if ($nick == NickServ) { ns identify M`/p@SsW0r|) }
}
Compatibility
Added: v2.1a
Added on: 28/02/95
See Also
v · d · e mIRC on event list
A
on Action, on Active, on Agent, on Appactive
B
on Ban
C
on Char, on Chat, on Chatclose, on Chatopen, on Close, on Connect, on Connectfail, on Ctcpreply
D
on Dccserver, on Dehelp, on Deop, on Deowner, on Devoice, on Dialog, on Disconnect, on Dns
E
on Error, on Exit
F
on Filercvd, on Filesent
G
on Getfail
|
H
on Help, on Hotlink
I
on Input, on Invite
J
on Join
K
on Keydown, on Keyup, on Kick
L
on Load, on Logon
M
on Midiend, on Mode, on Mp3end
N
on Nick, on Nosound, on Notice, on Notify
O
on Op, on Open, on Owner
P
on Parseline, on Part, on Ping, on Playend, on Pong
|
Q
on Queryclose, on Queryopen, on Quit
R
on Rawmode
S
on Sendfail, on Serv, on Servclose, on Servermode, on Serverop, on Servopen, on Signal, on Snotice, on Sockclose, on Socklisten, on Sockopen, on Sockread, on Sockwrite, on Start
T
on Text, on Topic
U
on Udpread, on Udpwrite, on Unban, on Unload, on Unotify, on Usermode
|
V
on Vcmd, on Voice
W
on Wallops, on Waveend
|