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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
bast
Voice
Posts: 37 Joined: Sat Oct 07, 2006 10:24 pm
Post
by bast » Fri Oct 12, 2007 10:12 pm
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.
bast
Voice
Posts: 37 Joined: Sat Oct 07, 2006 10:24 pm
Post
by bast » Tue Oct 16, 2007 5:00 pm
im bumbing this thread abit. =)
No one knows if it´spossible to do this or if it´s a script like this already?
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Tue Oct 16, 2007 8:06 pm
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
bast
Voice
Posts: 37 Joined: Sat Oct 07, 2006 10:24 pm
Post
by bast » Fri Oct 19, 2007 6:16 am
Sorry can´t find any in there.
Got a link Alchera, if there is any in the archive?
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Fri Oct 19, 2007 1:39 pm
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
bast
Voice
Posts: 37 Joined: Sat Oct 07, 2006 10:24 pm
Post
by bast » Tue Oct 23, 2007 8:50 pm
thx nml375, but i cant get taht to work thou. i have set the channels to +ophelp but still nothing happends.
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Wed Oct 24, 2007 6:47 am
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
bast
Voice
Posts: 37 Joined: Sat Oct 07, 2006 10:24 pm
Post
by bast » Wed Oct 24, 2007 8:15 am
ok, now i get this instead.
Code: Select all
Tcl error [pub:ophelp]: invalid command name "pub:ophelp"
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Wed Oct 24, 2007 11:08 am
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
bast
Voice
Posts: 37 Joined: Sat Oct 07, 2006 10:24 pm
Post
by bast » Wed Oct 24, 2007 5:10 pm
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?
BeBoo
Halfop
Posts: 42 Joined: Wed Sep 26, 2007 1:44 am
Post
by BeBoo » Thu Oct 25, 2007 3:49 pm
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"
bast
Voice
Posts: 37 Joined: Sat Oct 07, 2006 10:24 pm
Post
by bast » Thu Oct 25, 2007 7:48 pm
thx BeBoo and nml375.
Now i got what i want.