|
Joined: Apr 2004
Posts: 73
Babel fish
|
OP
Babel fish
Joined: Apr 2004
Posts: 73 |
Hey everyone, Since I am the only on here who seems to use networks with sops, i was wondering if someone could write me an on sop workaround. An on Raw would be great. Thanks -Zelda4ever aka "The Big 'Z'"
/tokenize 32 $gettok($1-,1-,32)
|
|
|
|
Joined: Dec 2003
Posts: 261
Fjord artisan
|
Fjord artisan
Joined: Dec 2003
Posts: 261 |
Hi, there. I guess you mean channel sop. If my guess is good, then the only way mIRC can know if somebody is sop is: 1) on servers that support /mode #channel +a <user> : to check if user has +a mode, or to request sop channel list 2) on server that don't support +a or +q modes : to request sop channel list So I don't see a way to script this, becouse, your script would have to check that channel list every time something (anything) happens. You can, however, make on *:text: event example and then inside that event check if user has +a or to request sop list.
I hope I am right about this. :tongue:
velicha dusha moja Gospoda
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
You could use on RAWMODE /help on rawmode Im not sure what character does your network use for SOPs (and not sure how to make that script), so its hard to one, but should be something like this: on *:RAWMODE:#: {
if ([color:red]+a[/color] isin $1-) { commands }
} Hope this helps Zyzzy.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Feb 2003
Posts: 67
Babel fish
|
Babel fish
Joined: Feb 2003
Posts: 67 |
This will detect when you get moded +a (SOP/Founder) on networks that have this feature.
on *:rawmode:#: {
if (($1 == +a) && ($2 == $me)) {
commands here
}
}
Those who live by the sword get shot by those who don't.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
The other codes you've been given won't work if someone provides a mode change that involves more than just +a (ie. /mode #channel +ma nickname will break all of them). Here's a little bit of code to provide events for every mode change: on ^*:rawmode:#:{
; Creates signals in the form mode<sign><modechar>
var %i = 1, %parm = 1, %sign
while $mid($1, %i, 1) != $null {
var %char = $ifmatch
if (%char isin +-) %sign = %char
else {
if (%sign == + && %char isin $gettok($chanmodes,1-3,44) $+ $nickmode) || (%sign == - && %char isin $gettok($chanmodes,1-2,44) $+ $nickmode) {
inc %parm
.signal -n $+(mode, %sign, %char) # $nick $eval($ $+ %parm,2)
}
else .signal -n $+(mode, %sign, %char) # $nick
}
inc %i
}
; Uncomment line below to hide default event
; haltdef
} So to do something with +a/-a events, you would create two signals like this: on *:signal:mode+a:{
; $1 is channel, $2 is nick, $3 is parameter
[color:red]Your commands here for +a events[/color]
}
on *:signal:mode-a:{
; $1 is channel, $2 is nick, $3 is parameter
[color:red]Your commands here for -a events[/color]
}
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Apr 2004
Posts: 73
Babel fish
|
OP
Babel fish
Joined: Apr 2004
Posts: 73 |
Hey,
Cool, thanks for the help.
-Zelda4ever aka "The Big 'Z'"
/tokenize 32 $gettok($1-,1-,32)
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
May I ask why only the 3 first chanmodes?
$gettok($chanmodes,1-3,44)
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
It's the first 3 classes of chanmodes, as defined in the CHANMODES token of raw 005. There are 4 classes that the CHANMODES token defines, separated by a comma (ASCII character 44 - the delimiter I'm using in that $gettok() call). The first two classes take a parameter when they're set (+ <mode>) and when they're unset (- <mode>), the third class only takes a parameter when being set, and the fourth class never takes a parameter. If you take a look at the entire line that the $gettok() is being used on, it's checking that if the sign is a plus then the character is in the first 3 classes, and if the sign is negative then it's checking if the character is in the first 2 classes. In other words that line is checking whether that particular mode takes a parameter. Note: Take a look here for a more complete explanation of the CHANMODES token.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
I never got the reply message in my email, so I just saw the answer now. Thanks!
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
|