mIRC Home    About    Download    Register    News    Help

Print Thread
#12656 23/02/03 02:52 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
on *:NICK: {
echo $comchan 7:2[ $+ $asctime(hh:nn:ss) $+ ]7 $nick is now knows as $newnick
haltdef
}

that does not work for me, what is wrong?



;Check for Life

if (%life == $null) {
goto getlife
}
#12657 23/02/03 03:07 PM
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
$comchan needs parameters.
You have to loop through $comchan($nick,[number]) with while loop.
$comchan($nick,0) returns the number of common channels.

#12658 23/02/03 03:35 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
so how can i make that work with comchan?



;Check for Life

if (%life == $null) {
goto getlife
}
#12659 23/02/03 03:40 PM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
Using $comchan($nick,1) will return the name of the first channel you are currently in with that nick.

#12660 23/02/03 03:48 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
k ty



;Check for Life

if (%life == $null) {
goto getlife
}
#12661 23/02/03 04:03 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Code:

on ^*:NICK:{
  var %i = 1
  while $comchan($newnick, %i) {
    echo $color(nick) -bflirt $ifmatch * $nick ( $+ $address $+ ) is now known as $newnick
    inc %i
  }
  haltdef
}
on ^*:QUIT:{
  var %i = 1, %reason = ( $+ $1- $+ )
  while $comchan($nick, %i) {
    echo $color(quit) -bflirt $ifmatch * Quits: $nick ( $+ $address $+ ) %reason
    inc %i
  }
  haltdef
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard