mIRC Home    About    Download    Register    News    Help

Print Thread
#168749 13/01/07 05:57 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
I want to make a script...
when a person joins (onJOIN)if his nick is registered then I want to display $nick thanks for registering. If he is not registered then $nick REGISTER YOUR NICK! Or you will NEVER be an op.

How do I do that?

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
you'd have to use the raw reply on a whois. So basically (as an example):

Code:
raw 307:*: {
  if ($2 ison #channel/raw $identifyer-number-related-to-the-channel-name) { msg $nick/#channel/raw $identifyer-number-related-to-the-channel-name Thanks for registering }
}



The reason for $nick/#channel/raw $identifyer-number-related-to-the-channel-name is because I forget if there's a string number assigned to a channel in that one line (which btw, was taken from dalnet's whois so I dont know if your network has a channel string value in it - but I dont think they do in THAT line)


Those who fail history are doomed to repeat it
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
Heres just a concept:
Code:
on *:join:#channel: {
 set %reg $addtok(%reg,$nick,44)
 whois $nick
 timer 1 4 noreg $nick
}
alias noreg {
  set %reg $deltok(%reg,$findtok(%reg,$1,44),44)
  msg $1 BLA BLA <--- insert msg for not identified here.
on *:part:#channel: {
 if (($comchan($nick,0) == 0) && ($istok(%reg.conf,$nick,44))) {
  set %reg.conf $deltok(%reg.conf,$findtok(%reg.conf,$nick,44),44)
 }
}
on *:quit: {
 if ($istok(%reg.conf,$nick,44)) {
  set %reg.conf $deltok(%reg.conf,$findtok(%reg.conf,$nick,44),44)
 }
}
raw 330:*: {
  set %reg.conf $addtok(%reg.conf,$4,44)
  set %reg $deltok(%reg,$findtok(%reg,$4,44),44)
}

The nick can then be checked with $istok(%reg.conf,$nick,44).

Last edited by Kardafol; 13/01/07 10:02 PM.

Those who can, cannot. Those who cannot, can.

Link Copied to Clipboard