mIRC Home    About    Download    Register    News    Help

Print Thread
#84916 01/06/04 09:03 PM
Joined: Apr 2004
Posts: 73
Z
Babel fish
OP Offline
Babel fish
Z
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. laugh

Thanks

-Zelda4ever
aka "The Big 'Z'"


/tokenize 32 $gettok($1-,1-,32)
#84917 01/06/04 09:17 PM
Joined: Dec 2003
Posts: 261
M
Fjord artisan
Offline
Fjord artisan
M
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
#84918 01/06/04 09:23 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
You could use on RAWMODE smile

/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:
Code:
on *:RAWMODE:#: {
 if ([color:red]+a[/color] isin $1-) { commands }
}


Hope this helps smile
Zyzzy.


"All we are saying is give peace a chance" -- John Lennon
#84919 02/06/04 02:56 AM
Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
This will detect when you get moded +a (SOP/Founder) on networks that have this feature.
Code:
 
on *:rawmode:#: { 
  if (($1 == +a) &amp;&amp; ($2 == $me)) {
    commands here
  }
}
 


Those who live by the sword get shot by those who don't.
#84920 02/06/04 12:29 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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:

Code:
on ^*:rawmode:#:{
  ; Creates signals in the form mode&lt;sign&gt;&lt;modechar&gt;
  var %i = 1, %parm = 1, %sign
  while $mid($1, %i, 1) != $null {
    var %char = $ifmatch
    if (%char isin +-) %sign = %char
    else {
      if (%sign == + &amp;&amp; %char isin $gettok($chanmodes,1-3,44) $+ $nickmode) || (%sign == - &amp;&amp; %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:
Code:
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.
#84921 03/06/04 04:00 AM
Joined: Apr 2004
Posts: 73
Z
Babel fish
OP Offline
Babel fish
Z
Joined: Apr 2004
Posts: 73
Hey,

Cool, thanks for the help.

-Zelda4ever
aka "The Big 'Z'"


/tokenize 32 $gettok($1-,1-,32)
#84922 12/08/04 09:09 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
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
#84923 12/08/04 11:52 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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.
#84924 25/08/04 08:59 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I never got the reply message in my email, so I just saw the answer now. Thanks! smile


"All we are saying is give peace a chance" -- John Lennon

Link Copied to Clipboard