mIRC Homepage
Posted By: Static Me again - Prb with on op help voice - 22/12/03 03:54 PM
Okay I wrote this code and it works fine but now it wont show a coupled mode like if a nick joins the room and is an op and a protected user the normal output would be
ChanBot sets mode: +oa Static Static
But now its just
(09:42:27 A) [Op] ChanBot Opped Static
Help please I cant find a remote for the other umodes for channels
Code:
on ^*:op:#: {
  echo $chan $asctime(10(04HH:nn:ss T10)) 10[4Op10] $nick Opped $opnick
  haltdef
}
on ^*:deop:#: {
  echo $chan $asctime(10(04HH:nn:ss T10)) 10[4Op10] $nick DeOpped $opnick
  haltdef
}
on ^*:help:#: {
  echo $chan $asctime(10(04HH:nn:ss T10)) 10[4HalfOp10] $nick HalfOpped $hnick
  haltdef
}
on ^*:dehelp:#: {
  echo $chan $asctime(10(04HH:nn:ss T10)) 10[4DeHalfOp10] $nick DeHalfOpped $hnick
  haltdef
}
on ^*:voice:#: {
  echo $chan $asctime(10(04HH:nn:ss T10)) 10[4Voice10] $nick Voiced $vnick
  haltdef
}
on ^*:devoice:#: {
  echo $chan $asctime(10(04HH:nn:ss T10)) 10[4DeVoice10] $nick DeVoiced $vnick
  haltdef
}
  
Posted By: emkookmer Re: Me again - Prb with on op help voice - 22/12/03 06:39 PM
i guess with umodes you mean usersmodes

it you want to trace other usermode you goto you a rawmode
in you case i see you use "a"
Code:
on *:RAWMODE:#: { 
  if ($1 == +a) {
    echo $chan $asctime(10(04HH:nn:ss T10)) 10[4 [color:red]what ever "a" means[/color] 10] $nick [color:red]what ever "a" means[/color] $2-
  }
  if ($1 == -a) {
    echo $chan $asctime(10(04HH:nn:ss T10)) 10[4 [color:red]what ever "a" means[/color] 10] $nick [color:red]what ever "a" means[/color] $2-
  }
  [color:blue]/echo -s Raw mode line: $nick set $1-[/color] 
}


you only need to change the red part to what it does realy mean

BTW the blue part is optional
Posted By: KingTomato Re: Me again - Prb with on op help voice - 22/12/03 07:29 PM
that script is already flawed. I personally have never seen a single case of just a "+a" in a mode change. I've seen +oa, but never +a--so when exactly do you plan on having your script take action?
Posted By: Static Re: Me again - Prb with on op help voice - 22/12/03 10:11 PM
King its the fact the script wont list the +a only the Op part when they are together. so if there is a mode change of +oa i wont see the a.
Posted By: Static Re: Me again - Prb with on op help voice - 22/12/03 11:14 PM
thanks yours almost worked
had to do
if (+a isin $1-) {
Edit-----
one problem
(17:13:23 P) [Protected] X Protected Static-AFK
(17:13:23 P) [DeProtected] X DeProtected Static-AFK
everytime im thrown in halts and haltdefs no go
Posted By: KingTomato Re: Me again - Prb with on op help voice - 23/12/03 02:28 AM
try this:

Code:
alias getmodes {
  var %param = 2, %m = 1
  while (%m <= $len($gettok($1, 1, 32))) {
    var %chr = $mid($gettok($1, 1, 32), %m, 1)
    if (%chr isin +-) var %mod = %chr
    else {
      if ((%chr isincs $remove($gettok($chanmodes,1-3,44),$chr(44))) || (%chr isincs qaohv)) {
        var %modes = $addtok(%modes, $+(%mod,%chr,:,$gettok($1, %param, 32)), 32)
        /inc %param
      }
      else var %modes = $addtok(%modes, $+(%mod,%chr), 32)
    }
    /inc %m
  }
  return %modes
}

on *:RAWMODE:#: {
  var %modes = $getmodes($1-)
  if ($wildtok(%modes, +a:*, 1, 32)) {
    var %nick = $gettok($ifmatch, 2, $asc(:))
    ; use %nick instead of $2-, and viola
  }
}
Posted By: Static Re: Me again - Prb with on op help voice - 23/12/03 02:30 AM
run the alias everytime or on connect?
Posted By: KingTomato Re: Me again - Prb with on op help voice - 23/12/03 02:39 AM
Let rawmode call the alias
Posted By: Static Re: Me again - Prb with on op help voice - 23/12/03 02:48 AM
Otay that works beautifuly on +a im having problems trying to make it work on -a +o-o what not
Edit----
It works just not when I join a room and I can live with that sorry
Posted By: KingTomato Re: Me again - Prb with on op help voice - 23/12/03 02:57 AM
Code:
on *:RAWMODE:#: {
  var %modes = $getmodes($1-)
  ; +a
  if ($wildtok(%modes, [color:Red]+a[/color]:*, 1, 32)) {
    var %nick = $gettok($ifmatch, 2, $asc(:))
    ;
  }
  ; -a
  else if ($wildtok(%modes, [color:Red]-a[/color]:*, 1, 32)) {
    var %nick = $gettok($ifmatch, 2, $asc(:))
    ;
  }
}

play witht he red portions
Posted By: Static Re: Me again - Prb with on op help voice - 23/12/03 03:02 AM
omg thankyou You are my scripting GOD that is what i was looking for thank you!!!!!!
Posted By: KingTomato Re: Me again - Prb with on op help voice - 23/12/03 03:14 AM
np.

Personally, I think mIRC should have an intergrated identifyer like $getmodes. $mode() just doesn't cut it. It might get you the Nth paramter, but matching the letter to the parameter is troubling. Something like this would be nice:

$mode(N)

Gets the Nth mode

Properties:
- chr - Gets the mode character
- param - gets the parameter associtated with the mode

i.e. something like a mode change of "+ovp KingTomato KingTomato" would return:

$mode(1) = KingTomato (Like Normal)
$mode(1).chr = o
$mode(1).param = KingTomato

$mode(2) = KingTomato (Again, normal)
$mode(2).chr = v
$mode(2).param = KingTomato

$mode(3) = $null
$mode(3).chr = p
$mode(3).param = $null
Posted By: Static Re: Me again - Prb with on op help voice - 23/12/03 03:28 AM
suggest it in the Suggestions lol
Posted By: Static Re: Me again - Prb with on op help voice - 23/12/03 03:33 AM
hey it looks pretty i cant get it to work lol sorry
Posted By: KingTomato Re: Me again - Prb with on op help voice - 23/12/03 03:59 AM
Get what to work?
Posted By: Static Re: Me again - Prb with on op help voice - 23/12/03 08:18 AM
N/M Ill just drop this section of the script and leave it to mIRC defaults I cant get it to work thanks for the help tho
© mIRC Discussion Forums