mIRC Home    About    Download    Register    News    Help

Print Thread
#174270 04/04/07 07:04 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
when joining my room chanserv sets the mode +q.
but using this code doesn't work:
Code:
iif($nick($chan,$me,q),add): bla bla bla

anyone any idea how to make it work?
Code:
iif($me isowner $chan,add): bla bla bla

this i also tryed but that doesn't work on that server

Greetings

Bullseye #174271 04/04/07 07:21 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
try $iif

DJ_Sol #174272 04/04/07 07:37 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
sorry forgot to copy that it says $iif.
My mistake frown

Bullseye #174277 04/04/07 08:32 PM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
on certain networks q is sent as a list mode which means mirc wont keep track of it as it would normally when its a nickmode and has an assosciated prefix. here's a small snippet for these cases (which supports the nickmode case too):

Code:
; $isowner(#chan,nick)

alias isowner {
  if ($isid) return $iif($nick($1,$2,q) || $istok($ial($2).mark,$1,32),$true,$false)
  .ialmark $2 $($+($,$3,tok($ial($2).mark,$1,32)),2)
}

on *:join:#:{ isowner # $nick rem }

on *:owner:#:{ isowner # $opnick add }

on *:deowner:#:{ isowner # $opnick rem }

raw 386:*:{ isowner $2- add }


the raw event triggers when you're sent the owner list (you use /mode #chan +q to request it), which you could do in a join event when ($nick == $me) && (q isincs $gettok($chanmodes,1,44)), i didnt feel like adding it.. up to you whether you want to send the extra command on join :P if you don't then, much like with the banlist, you cant be 100% certain who's on it after having just joined

so now you can use $iif($isowner(#,$me),add) in your popup




"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
jaytea #174279 04/04/07 08:49 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You never run out of clever tricks, do you? smile Very nice usage of token identifiers and $eval()!


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
qwerty #174280 04/04/07 09:10 PM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
aww thanks :*


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
jaytea #174293 05/04/07 02:06 AM
Joined: Mar 2007
Posts: 60
S
Babel fish
Offline
Babel fish
S
Joined: Mar 2007
Posts: 60
So much for that challenge Timmy made :p unless that's over? :P


"In order to succeed, your desire for success should be greater than your fear of failure."
Spitfire3292 #174301 05/04/07 07:58 AM
Joined: Mar 2007
Posts: 38
H
Ameglian cow
Offline
Ameglian cow
H
Joined: Mar 2007
Posts: 38


"if ($me ison $forum) { say Hello! }"

Link Copied to Clipboard