egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Notice all Ops on command

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Ajax87
Voice


Joined: 03 Mar 2006
Posts: 2

PostPosted: Fri Mar 03, 2006 3:42 pm    Post subject: Notice all Ops on command Reply with quote

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 Smile. Neat eh Smile.
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Mar 03, 2006 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Ajax87
Voice


Joined: 03 Mar 2006
Posts: 2

PostPosted: Fri Mar 03, 2006 8:05 pm    Post subject: Reply with quote

apologies, and thanks also.
Back to top
View user's profile Send private message
syfx
Voice


Joined: 15 Jun 2005
Posts: 6

PostPosted: Tue Jun 06, 2006 7:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Wed Jun 07, 2006 6:14 am    Post subject: Reply with quote

Improved since tosser's script will only use lots of messages for no good reason. Rolling Eyes

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jun 07, 2006 6:43 am    Post subject: Reply with quote

MeTroiD wrote:
Improved since tosser's script will only use lots of messages for no good reason. Rolling Eyes

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 Very Happy.
_________________
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
View user's profile Send private message MSN Messenger
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Jun 07, 2006 8:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Minus
Voice


Joined: 01 Jul 2006
Posts: 8

PostPosted: Sat Jul 01, 2006 4:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
starpossen
Op


Joined: 10 Jan 2006
Posts: 139

PostPosted: Tue Jan 23, 2007 3:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber