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 

[filled]A msg to all ops in one window

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


Joined: 07 Oct 2006
Posts: 37

PostPosted: Fri Oct 12, 2007 10:12 pm    Post subject: [filled]A msg to all ops in one window Reply with quote

I would like my users to have a command like.
!op i need help on some things

and all my ops see this in a chatwindow.
<user> need help on some things
<bot> OP has been informed.

Anyone up to make such a script? r there is one perhaps?

thanks in advance.


Last edited by bast on Fri Oct 26, 2007 5:36 pm; edited 2 times in total
Back to top
View user's profile Send private message
bast
Voice


Joined: 07 Oct 2006
Posts: 37

PostPosted: Tue Oct 16, 2007 5:00 pm    Post subject: Reply with quote

im bumbing this thread abit. =)
No one knows if itīspossible to do this or if itīs a script like this already?
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Oct 16, 2007 8:06 pm    Post subject: Reply with quote

Search the Tcl Archive?
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
bast
Voice


Joined: 07 Oct 2006
Posts: 37

PostPosted: Fri Oct 19, 2007 6:16 am    Post subject: Reply with quote

Sorry canīt find any in there.
Got a link Alchera, if there is any in the archive?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Oct 19, 2007 1:39 pm    Post subject: Reply with quote

Code:
bind pub - "!op" pub:ophelp
setudef flag ophelp
proc pub:ophelp {nick host hand chan what} {
 if {[channel get $chan ophelp]} {
  foreach oper [chanlist $chan +o|+o] {
   puthelp "NOTICE $oper :<$nick> $what"
  }
 }
}


Some optimization could be done, such as grouping messages, but should get the job done fairly enough. Will send a notice relaying the message to all recognized users in the channel with global or local +o permissions. Will only operate on channels which has been set "+ophelp" using .chanset (dcc) or "channel set" (tcl).

Code is released into Public Domain.
_________________
NML_375, idling at #eggdrop@IrcNET


Last edited by nml375 on Wed Oct 24, 2007 11:09 am; edited 1 time in total
Back to top
View user's profile Send private message
bast
Voice


Joined: 07 Oct 2006
Posts: 37

PostPosted: Tue Oct 23, 2007 8:50 pm    Post subject: Reply with quote

thx nml375, but i cant get taht to work thou. i have set the channels to +ophelp but still nothing happends.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Oct 24, 2007 6:47 am    Post subject: Reply with quote

Ahh, my bad, was thinking of the pubm pattern when I created the pub-binding...

Code:
#Change this
bind pub - "% !op" pub:ophelp
#into this
bind pub - "!op" pub:ophelp

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
bast
Voice


Joined: 07 Oct 2006
Posts: 37

PostPosted: Wed Oct 24, 2007 8:15 am    Post subject: Reply with quote

ok, now i get this instead.
Code:
Tcl error [pub:ophelp]: invalid command name "pub:ophelp"
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Oct 24, 2007 11:08 am    Post subject: Reply with quote

Darn, should've learn'd to not code while still sleeping by now..

Used different names when creating the proc compared to the one used in the binding...

Updating first post to accomodate this fix, along with the previous one..
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
bast
Voice


Joined: 07 Oct 2006
Posts: 37

PostPosted: Wed Oct 24, 2007 5:10 pm    Post subject: Reply with quote

nice nml375, now i got it working.
Then if i whant it to send to a specifik chan instead of the chan the user writes the msg in?
Back to top
View user's profile Send private message
BeBoo
Halfop


Joined: 26 Sep 2007
Posts: 42

PostPosted: Thu Oct 25, 2007 3:49 pm    Post subject: Reply with quote

It's going to send a notice to any opers in the channel. You would have to do something similar to the following:

Code:
set myChan "#oper"
foreach oper [chanlist $myChan +o|+o] {
   puthelp "NOTICE $oper :<$nick> $what"
  }


If you wanted it to just send a notice to the channel, you can just replace this line:
Code:
puthelp "NOTICE $oper :<$nick> $what"

with
Code:
puthelp "NOTICE $chan :<$nick> $what"

or this, if you use the myChan above:
Code:
puthelp "NOTICE $myChan :<$nick> $what"
Back to top
View user's profile Send private message
bast
Voice


Joined: 07 Oct 2006
Posts: 37

PostPosted: Thu Oct 25, 2007 7:48 pm    Post subject: Reply with quote

thx BeBoo and nml375.
Now i got what i want. Wink
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