| View previous topic :: View next topic |
| Author |
Message |
MetalGuru1972 Voice
Joined: 17 Sep 2007 Posts: 2
|
Posted: Tue Sep 18, 2007 11:37 am Post subject: Checking for ops in channels and reporting |
|
|
Hi,
I hope someone can help with this question.
When my bot joins channels, is it possible for it to set a timer and check it's Op or Hop status ever x mins? If it is opped, i would like it reported into a specific channel.
I know there are several scripts that check for Ops status, but i have a specific need for the base code. If anyone can help, it would be much appriciated. Thank you |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Tue Sep 18, 2007 8:52 pm Post subject: Re: Checking for ops in channels and reporting |
|
|
| MetalGuru1972 wrote: | Hi,
I hope someone can help with this question.
When my bot joins channels, is it possible for it to set a timer and check it's Op or Hop status ever x mins? If it is opped, i would like it reported into a specific channel.
I know there are several scripts that check for Ops status, but i have a specific need for the base code. If anyone can help, it would be much appriciated. Thank you |
This is should work as you want it too.
| Quote: |
- It will check every 5 minutes.
- You can replace value 5 in both timers to set what ever value you want.
- Replace #reportchannel to the channel you want to report it to.
|
| Code: |
bind join - "*" check:ops
proc check:ops {nick uhost hand chan} {
if {[isbotnick $nick]} {
timer 5 [list see:ops $chan]
}
}
proc see:ops {chan} {
if {[botonchan $chan]} {
set ops 0; set voices 0
foreach user [chanlist $chan] {
if {[isop $user $chan]} {
incr ops
} elseif {[isvoice $user $chan]} {
incr voices
}
}
if {[botisop $chan]} {
putserv "PRIVMSG #reportchannel :Ops: $ops - Voices: $voices"
}
}
timer 5 [list see:ops $chan]
}
|
*** For this script to work you have to make the bot join the channel.
- Either restart the bot or make it cycle the channel. _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|