mIRC Home    About    Download    Register    News    Help

Print Thread
Me again - Prb with on op help voice #64835 22/12/03 03:54 PM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
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
}
  


chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64836 22/12/03 06:39 PM
Joined: Jan 2003
Posts: 28
E
emkookmer Offline
Ameglian cow
Offline
Ameglian cow
E
Joined: Jan 2003
Posts: 28
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

Re: Me again - Prb with on op help voice #64837 22/12/03 07:29 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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?


-KingTomato
Re: Me again - Prb with on op help voice #64838 22/12/03 10:11 PM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
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.


chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64839 22/12/03 11:14 PM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
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

Last edited by Static; 22/12/03 11:20 PM.

chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64840 23/12/03 02:28 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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
  }
}


-KingTomato
Re: Me again - Prb with on op help voice #64841 23/12/03 02:30 AM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
run the alias everytime or on connect?


chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64842 23/12/03 02:39 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Let rawmode call the alias


-KingTomato
Re: Me again - Prb with on op help voice #64843 23/12/03 02:48 AM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
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

Last edited by Static; 23/12/03 02:53 AM.

chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64844 23/12/03 02:57 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
Re: Me again - Prb with on op help voice #64845 23/12/03 03:02 AM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
omg thankyou You are my scripting GOD that is what i was looking for thank you!!!!!!


chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64846 23/12/03 03:14 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
Re: Me again - Prb with on op help voice #64847 23/12/03 03:28 AM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
suggest it in the Suggestions lol


chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64848 23/12/03 03:33 AM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
hey it looks pretty i cant get it to work lol sorry


chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv
Re: Me again - Prb with on op help voice #64849 23/12/03 03:59 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Get what to work?


-KingTomato
Re: Me again - Prb with on op help voice #64850 23/12/03 08:18 AM
Joined: Nov 2003
Posts: 84
S
Static Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Nov 2003
Posts: 84
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


chat.irchat.tv
#Help #Trivia #Scripts
Co-Admin @ IRChat.tv