This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

[filled]A msg to all ops in one window

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
b
bast
Voice
Posts: 37
Joined: Sat Oct 07, 2006 10:24 pm

[filled]A msg to all ops in one window

Post by bast »

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.
b
bast
Voice
Posts: 37
Joined: Sat Oct 07, 2006 10:24 pm

Post by bast »

im bumbing this thread abit. =)
No one knows if it´spossible to do this or if it´s a script like this already?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Search the Tcl Archive?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
b
bast
Voice
Posts: 37
Joined: Sat Oct 07, 2006 10:24 pm

Post by bast »

Sorry can´t find any in there.
Got a link Alchera, if there is any in the archive?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Code: Select all

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.
Last edited by nml375 on Wed Oct 24, 2007 11:09 am, edited 1 time in total.
NML_375
b
bast
Voice
Posts: 37
Joined: Sat Oct 07, 2006 10:24 pm

Post by bast »

thx nml375, but i cant get taht to work thou. i have set the channels to +ophelp but still nothing happends.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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

Code: Select all

#Change this
bind pub - "% !op" pub:ophelp
#into this
bind pub - "!op" pub:ophelp
NML_375
b
bast
Voice
Posts: 37
Joined: Sat Oct 07, 2006 10:24 pm

Post by bast »

ok, now i get this instead.

Code: Select all

Tcl error [pub:ophelp]: invalid command name "pub:ophelp"
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
b
bast
Voice
Posts: 37
Joined: Sat Oct 07, 2006 10:24 pm

Post by bast »

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?
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

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

Code: Select all

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: Select all

puthelp "NOTICE $oper :<$nick> $what"
with

Code: Select all

puthelp "NOTICE $chan :<$nick> $what"
or this, if you use the myChan above:

Code: Select all

puthelp "NOTICE $myChan :<$nick> $what"
b
bast
Voice
Posts: 37
Joined: Sat Oct 07, 2006 10:24 pm

Post by bast »

thx BeBoo and nml375.
Now i got what i want. ;)
Post Reply