| View previous topic :: View next topic |
| Author |
Message |
Ajax87 Voice
Joined: 03 Mar 2006 Posts: 2
|
Posted: Fri Mar 03, 2006 3:42 pm Post subject: Notice all Ops on command |
|
|
Hi, I want my eggdrop bot to send a Notice message to ALL ops in a channel when anyone shouts !admin. I'm sure this must be doable, but it's beyond me.
The reason is I'm setting up our server reports to feed into IRC, so this will allow someone on the server to call for an admin by typing "/irc !admin" ingame . Neat eh . |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Fri Mar 03, 2006 8:02 pm Post subject: |
|
|
This should of been posted on Script Request but
| Code: | # this is the channel where you want the script to work on
set ::admin(chan) "#channel"
bind pub -|- !admin pub:admin
proc pub:admin {nickname hostname handle channel text} {
if {[string match -nocase "$::admin(chan)" $channel]} {
foreach user [chanlist $channel] {
if {[isop $user $channel]} {
putserv "NOTICE $user :Admin request by $nickname in $channel."
}
}
}
} |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
Ajax87 Voice
Joined: 03 Mar 2006 Posts: 2
|
Posted: Fri Mar 03, 2006 8:05 pm Post subject: |
|
|
| apologies, and thanks also. |
|
| Back to top |
|
 |
syfx Voice
Joined: 15 Jun 2005 Posts: 6
|
Posted: Tue Jun 06, 2006 7:03 pm Post subject: |
|
|
| Hi guys, im looking for a script that is very similar to this, but instead of NOTICE 'ing 1 user, could the script above be modified to output the ':Admin request by $nickname in $channel' into another IRC channel? |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Wed Jun 07, 2006 6:14 am Post subject: |
|
|
Improved since tosser's script will only use lots of messages for no good reason.
| Code: | # this is the channel where you want the script to work on
set adminchan "#channel"
bind pub -|- !admin pub:admin
proc pub:admin {nickname hostname handle channel text} {
global adminchan; set list ""
if {[string equal -nocase $adminchan $channel]} {
foreach user [chanlist $channel] {
if {[isop $user $channel]} {
lappend list $user
}
}
if {[llength $list]} {
putserv "NOTICE [join $list ,] :Admin request by $nickname in $channel."
}
}
}
|
Also, to pm into a different channel
| Code: | # this is the channel where you want the script to work on
set userchan #channel
# this is the channel the messages gets sent too.
set adminchan #channel2
bind pub -|- !admin pub:admin
proc pub:admin {nickname hostname handle channel text} {
global userchan adminchan; set list ""
if {[string equal -nocase $userchan $channel]} {
putserv "PRIVMSG $adminchan :Admin request by $nickname in $channel."
}
}
|
|
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed Jun 07, 2006 6:43 am Post subject: |
|
|
| MeTroiD wrote: | Improved since tosser's script will only use lots of messages for no good reason. |
The only reason would be compatibility with all networks, since a few might have set max targets to 1. Its a pity eggdrop doesnt parse/save the init strings for purposes like max target lookup etc. ^-^. Theoretically you could dynamically limit the target number... but probably it is 1 or 20 and there will never be 20 admins only . _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Wed Jun 07, 2006 8:33 am Post subject: |
|
|
Some ircds support "status messages", so
| Code: | | putserv "PRIVMSG @$adminchan :Admin request by $nickname in $channel." | is possible on those to send a message to chanops. |
|
| Back to top |
|
 |
Minus Voice
Joined: 01 Jul 2006 Posts: 8
|
Posted: Sat Jul 01, 2006 4:50 pm Post subject: |
|
|
how can i make it so if a user sayes in any channel ex :
I need a bnc please help
the eggdrop takes the keyword ex "bnc" and say in the adminchan "I need a bnc please help $nickname $channel" |
|
| Back to top |
|
 |
starpossen Op
Joined: 10 Jan 2006 Posts: 139
|
Posted: Tue Jan 23, 2007 3:27 am Post subject: |
|
|
How would you go about making the script noctice the user typing the command, like:
user:!staff
-bot- Staff has been notified, please be patient.
*EDIT* Okay I fixed it, I just added:
| Code: |
putserv "NOTICE $nickname :Notice send to staff, please be patient."
|
|
|
| Back to top |
|
 |
|