mIRC Home    About    Download    Register    News    Help

Print Thread
#174283 04/04/07 11:12 PM
Joined: Feb 2007
Posts: 9
M
Mogar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2007
Posts: 9
Code:
on ^*:op:#: {
  echo -t $chan $space(1)  15 $nick  oped 4[14op4]15 to4:15  $opnick  in channel4:15  $chan  | haltdef
  if ($nick == $me) { echo -a } | else {
    echo -t $chan $space(1) 15 $nick  is 4[14 $+ $address $+ 4]15 
  }
}
on ^*:deop:#: {
  echo -t $chan $space(1) 15 $nick  deoped 4[14op4]15 to4:15  $opnick  in channel4:15  $chan  | haltdef
  if ($nick == $me) { echo -a } | else {
    echo -t $chan $space(1) 15 $nick  is 4[14 $+ $address $+ 4]15
  }
}
on ^*:protect:#: {
  echo -t $chan $space(1)  15 $nick  oped 4[14op4]15 to4:15  $opnick  in channel4:15  $chan  | haltdef
  if ($nick == $me) { echo -a } | else {
    echo -t $chan $space(1) 15 $nick  is 4[14 $+ $address $+ 4]15 
  }
}


what is the command word for +a/-a?

Mogar #174288 04/04/07 11:53 PM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
you have to do a little mode parsing:

Code:
on *:rawmode:#:{ 
  if (*a*,*,*,* iswmcs $chanmodes) {
    var %a = 1, %b, %c = 2
    while ($mid($1,%a,1)) {
      if ($v1 isin +-) %b = $v1
      if ($v1 === a) .signal a $+ %b # $($ $+ %c,2) $nick
      if ($regex($nickmode $chanmodes,/(?:^|,)(?=.* $v1 )/gx) %b isin 3 +1 %b 2 %b) inc %c
      inc %a
    }
  }
}

on *:signal:a?:{
  if ($2 == $me) {
    if ($signal == a+) {
      msg $1 waw hihi thanks, $3!
    }
    else {
      msg $1 NOO, fakc you $3 >:/
    }
  }
}


you can change those msgs there :P


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Feb 2007
Posts: 9
M
Mogar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2007
Posts: 9
damn i just spent two hours scripting and was hoping this answer would be easy but i'll work with it and thanks for the help

Joined: Feb 2006
Posts: 65
F
Babel fish
Offline
Babel fish
F
Joined: Feb 2006
Posts: 65
Code:
on *:rawmode:#:{ 
  if (*a*,*,*,* iswmcs $chanmodes) {
    var %a = 1, %b, %c = 2
    while ($mid($1,%a,1)) {
      if ($v1 isin +-) %b = $v1
      if ($v1 === a) .signal a $+ %b # $($ $+ %c,2) $nick
      if ($regex($nickmode $chanmodes,/(?:^|,)(?=.* $v1 )/gx) %b isin 3 +1 %b 2 %b) inc %c
      inc %a
    }
  }
}
;;protect
on *:signal:a+:{ 
;;--- the format is odd, $1 = chan $2 = nick $3 = target (i think)

}
;;deprotect
on *:signal:a-:{ 
;;--- the format is odd, $1 = chan $2 = nick $3 = target (i think)

}



known on irc as MrStonedOne
read my full post before replying or dont reply. tl;dr isn't allowed here
FaiNT #174441 07/04/07 07:58 PM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
$2 = person affected, $3 = person who performed the mode change if that's what you meant by nick/target


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard