mIRC Home    About    Download    Register    News    Help

Print Thread
#172682 13/03/07 10:30 PM
Joined: Mar 2007
Posts: 8
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Mar 2007
Posts: 8
raw 352:*: {
set %lo 1
:dani
set %del $gettok($6,%lo,1) | .echo -a %del
inc %Lo
if %lo > 20 { halt }
goto dani
}

i made this for check the ircops but doesnt work
any help please


DarthQuiGon #172685 13/03/07 10:49 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
$gettok($6,%lo,1)

Is the token $chr(1) the correct token you want to use?

I'd think there's an easier way to check for IRCop but we all use different networks.

What about that raw that says: $nick looks usefull!

DJ_Sol #172688 13/03/07 11:17 PM
Joined: Mar 2007
Posts: 8
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Mar 2007
Posts: 8
i want do like this

Ircops : (3) black phanter,mortal,miranda

thnx for you post

DarthQuiGon #172689 13/03/07 11:32 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Oh ok, so you who the channel and save all the IRCops to a variable, then echo the variable.

I personally am not very experienced with normal IRC. I mostly wrote scripts for MSN and now this new network that uses IRCxPro.

All I can say is:

#1 when you who the channel, set a variable that says you are looking for IRCop's on that channel.
Quote:
ex: { set %ircop. [ $+ [ $chan ] ] | who $chan }
raw 352:*:{
if (!%ircop. [ $+ [ $2 ] ]) return
<Rest of code>
}
raw 353:*:/unset %ircop. [ $+ [ $2 ] ]
(I believe raw 353 is "end of who list for $chan" $2 would be the channel name.)


#2 use addtok to make your display variable.
for example ...
Quote:
if ($nick == ircop) %echo = $addtok(%echo,$nick,44)

and then
echo -a List of IRCop's %echo | unset %echo

Sorry I can't be more clear or exact, I would have to write and test code on your network.

DJ_Sol #172696 14/03/07 12:44 AM
Joined: Mar 2007
Posts: 8
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Mar 2007
Posts: 8
thnx man , preciate

DarthQuiGon #172704 14/03/07 06:35 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This will work with any IRCd that uses standard raw messages. Note: If your network uses a customized IRCd, then I will need the connection information for the network in order to fix anything that doesn't work.
I didn't know when, or how you wanted the display, so I left it as an echo (so only you see it) and I put it in a lot of locations. This is multiple channel and multiple network ready.

Code:
on *:join:#:{
  .enable #IRCop_check
  .who $chan
}
#IRCop_check off
raw 352:*:{
  if $chr(42) isin $7 {
    set $+(%,ircop,.,$cid,.,$2) $addtok($($+(%,ircop,.,$cid,.,$2),2),$1,32)
  }
}
raw 315:*:{
  echo $2 IRCops: ( $+ $numtok($($+(%,ircop,.,$cid,.,$2),2),32) $+ )  $replace($($+(%,ircop,.,$cid,.,$2),2),$chr(32),$+($chr(44),$chr(32)))
  haltdef
}
#IRCop_check end
on *:part:#:{
  set $+(%,ircop,.,$cid,.,$chan) $addtok($($+(%,ircop,.,$cid,.,$chan),2),$nick,1,32)
  echo $chan IRCops: ( $+ $numtok($($+(%,ircop,.,$cid,.,$chan),2),32) $+ )  $replace($($+(%,ircop,.,$cid,.,$chan),2),$chr(32),$+($chr(44),$chr(32)))
}
on *:kick:#:{
  set $+(%,ircop,.,$cid,.,$chan) $addtok($($+(%,ircop,.,$cid,.,$chan),2),$knick,1,32)
  echo $chan IRCops: ( $+ $numtok($($+(%,ircop,.,$cid,.,$chan),2),32) $+ )  $replace($($+(%,ircop,.,$cid,.,$chan),2),$chr(32),$+($chr(44),$chr(32)))
}
on *:quit:{
  var %a = 1, %b = $comchan($nick,0)
  while %a <= %b {
    set $+(%,ircop,.,$cid,.,$comchan($nick,%a)) $addtok($($+(%,ircop,.,$cid,.,$comchan($nick,%a)),2),$nick,1,32)
    echo $comchan($nick,%a) IRCops: ( $+ $numtok($($+(%,ircop,.,$cid,.,$comchan($nick,%a)),2),32) $+ )  $replace($($+(%,ircop,.,$cid,.,$comchan($nick,%a)),2),$chr(32),$+($chr(44),$chr(32)))
    inc %a
  }
}
on *:exit:{
  unset $+(%,ircop,*)
}
on *:disconnect:{
  unset $+(%,ircop,*)
}

[code]
[/code]


Link Copied to Clipboard