| View previous topic :: View next topic |
| Author |
Message |
bast Voice
Joined: 07 Oct 2006 Posts: 37
|
Posted: Fri Oct 12, 2007 10:12 pm Post subject: [filled]A msg to all ops in one window |
|
|
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 |
|
 |
bast Voice
Joined: 07 Oct 2006 Posts: 37
|
Posted: Tue Oct 16, 2007 5:00 pm Post subject: |
|
|
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 |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Oct 16, 2007 8:06 pm Post subject: |
|
|
Search the Tcl Archive? _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
bast Voice
Joined: 07 Oct 2006 Posts: 37
|
Posted: Fri Oct 19, 2007 6:16 am Post subject: |
|
|
Sorry canīt find any in there.
Got a link Alchera, if there is any in the archive? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Oct 19, 2007 1:39 pm Post subject: |
|
|
| 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 |
|
 |
bast Voice
Joined: 07 Oct 2006 Posts: 37
|
Posted: Tue Oct 23, 2007 8:50 pm Post subject: |
|
|
| thx nml375, but i cant get taht to work thou. i have set the channels to +ophelp but still nothing happends. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Oct 24, 2007 6:47 am Post subject: |
|
|
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 |
|
 |
bast Voice
Joined: 07 Oct 2006 Posts: 37
|
Posted: Wed Oct 24, 2007 8:15 am Post subject: |
|
|
ok, now i get this instead.
| Code: | | Tcl error [pub:ophelp]: invalid command name "pub:ophelp" |
|
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Oct 24, 2007 11:08 am Post subject: |
|
|
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 |
|
 |
bast Voice
Joined: 07 Oct 2006 Posts: 37
|
Posted: Wed Oct 24, 2007 5:10 pm Post subject: |
|
|
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 |
|
 |
BeBoo Halfop
Joined: 26 Sep 2007 Posts: 42
|
Posted: Thu Oct 25, 2007 3:49 pm Post subject: |
|
|
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 |
|
 |
bast Voice
Joined: 07 Oct 2006 Posts: 37
|
Posted: Thu Oct 25, 2007 7:48 pm Post subject: |
|
|
thx BeBoo and nml375.
Now i got what i want.  |
|
| Back to top |
|
 |
|