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.
Old posts that have not been replied to for several years.
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Mon Mar 08, 2004 11:43 am
Hello,
I can use a shell of a friend of mine to put my irc bot on. But I don't know anything about TCL scripts, so I'm going to ask some help here
EDIT: *first problem solved*
Next, there's the !admin command. Everybody can use the !admin <reason> command. This will highlight every op on the channel, and give them to reason.
Example:
PersonA: !admin Just testing.
Eggbot: Op1 , Op2 , Op3 Message: Just testing.
I have this in my irc script already, but I have no idea how to write it in TCL, if it's even possible.
The irc script is:
Code: Select all
on 1:TEXT:!admin *:#here:{
set %i 1
set %list $null
:next
set %nick $nick(#,%i,o)
if %nick == $null goto done
%lijst = %list $chr(32) $+ %nick
inc %i
goto next
:done
/msg $chan 4 $+ %list -- 7Admin needed! 10Reason: $2-
}
Please help
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Mon Mar 08, 2004 5:26 pm
ok so my first problem is solved, but there's still the !admin problem, and I think this one's really hard.
Can anyone help me with this please? :-/
Xpert
Halfop
Posts: 88 Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert » Tue Mar 09, 2004 7:24 am
Try this code:
Code: Select all
bind pubm - "!admin *" pub:admin
proc pub:admin {nick host hand chan args} {
set list ""
foreach nick2 [chanlist $chan] {
if {[isop $nick2 $chan]} {
append list " $nick2"
}
}
putserv "PRIVMSG $chan :4$list -- 7Admin needed! 10Reason: [lrange $args 1 end]"
}
I think it should work, but i didn't test it.
Hope it helps
Xpert.
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Tue Mar 09, 2004 1:15 pm
Thanks very much, I can't test it now, since the person who can update the eggdrop is offline.
One more question though, can you change it so that it only works on 1 channel?
Thank you!
Careto
Voice
Posts: 11 Joined: Tue Mar 02, 2004 1:33 pm
Post
by Careto » Tue Mar 09, 2004 3:10 pm
Code: Select all
bind pubm - "!admin *" pub:admin
proc pub:admin {nick host hand chan args} {
if {[string equal -nocase $chan "#anychannel"]} {
set list ""
foreach nick2 [chanlist $chan] {
if {[isop $nick2 $chan]} {
append list " $nick2"
}
}
putserv "PRIVMSG $chan :4$list -- 7Admin needed! 10Reason: [lrange $args 1 end]"
}
}
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Wed Mar 10, 2004 1:26 pm
Xpert wrote: bind pubm - "!admin *" pub:admin
Careto wrote: bind pubm - "!admin *" pub:admin
doc/tcl-commands.doc - bind pubm
The mask is matched against the channel name followed by the text
Have you ever read "The Manual"?
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Thu Mar 11, 2004 11:40 am
Code: Select all
bind pubm - "!admin *" pub:admin
proc pub:admin {nick host hand chan args} {
if {[string equal -nocase $chan "#telenet.to"]} {
set list ""
foreach nick2 [chanlist $chan] {
if {[isop $nick2 $chan]} {
append list " $nick2"
}
}
putserv "PRIVMSG $chan :\0034$list -- \0037Admin needed! \00310Reason: [lrange $args 1 end]"
}
}
Can somebody then tell me why this doesn't work?
Thanks
Doesn't it have to be "bind pub" instead of "bind pubm" ?
And {nick mask hand channel args} instead of {nick host hand chan args} ?
Just guessing a bit
Last edited by
Real on Thu Mar 11, 2004 11:47 am, edited 1 time in total.
Xpert
Halfop
Posts: 88 Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert » Thu Mar 11, 2004 11:43 am
Where's the bind gone?:)
Add this bind to your script:
Xpert.
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Thu Mar 11, 2004 11:48 am
I forgot to paste it, it's in my TCL script though :p
And it doesnt work
Xpert
Halfop
Posts: 88 Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert » Thu Mar 11, 2004 11:51 am
lol, and i thought you removed it:P
I think this code will worked:
Code: Select all
bind pubm - !admin pub:admin
proc pub:admin {nick host hand chan args} {
if {$chan == "#telenet.to"]} {
set list ""
foreach nick2 [chanlist $chan] {
if {[isop $nick2 $chan]} {
append list " $nick2"
}
}
putserv "PRIVMSG $chan :\0034$list -- \0037Admin needed! \00310Reason: [lrange $args 1 end]"
}
}
Xpert.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Thu Mar 11, 2004 12:58 pm
Xpert wrote: lol, and i thought you removed it:P
I think this code will worked:
I think you should have read my previous post. Do you mean 'pub'?
Have you ever read "The Manual"?
Xpert
Halfop
Posts: 88 Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert » Thu Mar 11, 2004 1:09 pm
user wrote: I think you should have read my previous post. Do you mean 'pub'
It worked on my eggdrop with the bind pubm....
Xpert.
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Thu Mar 11, 2004 2:54 pm
It doesn't on mine :/
Can somebody see what's wrong?
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Thu Mar 11, 2004 3:25 pm
This should work .. but not tested it yet altho i don't realy see the point of sutch script .....
Code: Select all
bind pub - !admin pub:admin
set mychan "#telenet.to"
proc pub:admin {nick host hand chan arg} {
global mychan
if {[string match -nocase $mychan $chan]} {
foreach user [chanlist $chan] {
if {[isop $user $chan]} {
if {[info exists list]} {
append list " $user"
} else {
set list "$user"
}
}
}
putserv "PRIVMSG $chan :\0034$list -- \0037Admin needed! \00310Reason: [lrange $arg 0 end]"
}
}
XplaiN but think of me as stupid
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Fri Mar 12, 2004 2:01 pm
Thanks mate, it works