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!
Hero
Halfop
Posts: 49 Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:
Post
by Hero » Wed Jul 04, 2012 6:47 pm
Hello I Need A Small Code For !Sapart
When Op Type !Sapart Nick Msg
The Bot Automatic Part That Nick Using Oper Acess
My Bot Is Network Admin and Sapart command is
/sapart nick #Chan Msg
And Create Like That The Code Only Work In #IspHelp chan
Thanks In Advance
Last edited by
Hero on Sun Jul 22, 2012 11:06 am, edited 2 times in total.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Thu Jul 05, 2012 8:56 am
Code: Select all
bind pub * !sapart oper:sapart
proc oper:sapart {nick uhost hand chan text} {
if {![string equal -nocase $chan "#IspHelp"]} return
if {![isop $nick $chan]} return
if {[scan $text {%s%s%s} user channel reason] != 3} {
puthelp "NOTICE $nick :usage: !sapart <nick> <channel> <messsage>"
return
}
putserv "SAPART $user $channel $message"
}
Edit: fixed.
Last edited by
caesar on Fri Jul 06, 2012 12:43 am, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.
Hero
Halfop
Posts: 49 Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:
Post
by Hero » Thu Jul 05, 2012 3:14 pm
<Prince> [19:13:31] Tcl error [oper:sapart]: illegal channel: Hero
SpiKe^^
Owner
Posts: 831 Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:
Post
by SpiKe^^ » Thu Jul 05, 2012 9:53 pm
the line throwing that error is:
try just changing it to:
GoodLuck:)
Hero
Halfop
Posts: 49 Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:
Post
by Hero » Fri Jul 06, 2012 2:19 am
Now This Error ....
<Prince> [06:17:21] Tcl error [oper:sapart]: can't read "message": no such variable
SpiKe^^
Owner
Posts: 831 Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:
Post
by SpiKe^^ » Fri Jul 06, 2012 12:41 pm
The line throwing that error is:
Code: Select all
putserv "SAPART $user $channel $message"
The variable you are calling is message, and it is never being set.
Try just changing that line to:
Code: Select all
putserv "SAPART $user $channel $reason"
GoodLuck:)
Hero
Halfop
Posts: 49 Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:
Post
by Hero » Fri Jul 06, 2012 1:11 pm
Is It Possible When A User Is Op In ChanneL Then The Bot Not Perform The Sapart Command On Him And Which Op Use The Command For That Op The Bot Notice Him " This Is Also Helper You Cannot Use This Command On Him"
Waiting For Reply
SpiKe^^
Owner
Posts: 831 Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:
Post
by SpiKe^^ » Fri Jul 06, 2012 1:40 pm
Up 'til now i've just been fixing the errors in the above command...
I really have no idea what we are wanting to pull off here. I'm not even sure what the SAPART command does, as i've never been a network admin:)
Please better explain our ultimate goal here.
SpiKe^^
Owner
Posts: 831 Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:
Post
by SpiKe^^ » Fri Jul 06, 2012 2:12 pm
Maybe I do understand your last request... lets just try this:
Code: Select all
proc oper:sapart {nick uhost hand chan text} {
if {![string equal -nocase $chan "#IspHelp"]} return
if {![isop $nick $chan]} return
if {[scan $text {%s%s%s} user channel reason] != 3} {
puthelp "NOTICE $nick :usage: !sapart <nick> <channel> <messsage>"
return
}
if {[isop $user $chan]} {
puthelp "NOTICE $nick :$user Is Also Helper, You Cannot Use This Command On Them"
return
}
putserv "SAPART $user $channel $message"
}
Let me know if that does it for you.
Hero
Halfop
Posts: 49 Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:
Post
by Hero » Fri Jul 06, 2012 2:48 pm
Done!!!
Thanks Spike^^ And caesar
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Jul 06, 2012 3:27 pm
You should consider adding a check on botnick as user like:
Code: Select all
if {[isbotnick $user]} {
# do whatever you wish
return
}
that should be added before the:
line, else it will match that part first.
Once the game is over, the king and the pawn go back in the same box.
Hero
Halfop
Posts: 49 Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:
Post
by Hero » Fri Jul 06, 2012 3:51 pm
Ok
Hero
Halfop
Posts: 49 Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:
Post
by Hero » Sat Jul 21, 2012 4:02 pm
This Code No More Working When I Use Trigger Bot Dosent Reply Me
Code: Select all
proc oper:sapart {nick uhost hand chan text} {
if {![string equal -nocase $chan "#IspHelp"]} return
if {![isop $nick $chan]} return
if {[scan $text {%s%s%s} user channel reason] != 3} {
puthelp "NOTICE $nick :usage: !sapart <nick> <channel> <messsage>"
return
}
if {[isop $user $chan]} {
puthelp "NOTICE $nick :$user Is Also Helper, You Cannot Use This Command On Them"
return
}
putserv "SAPART $user $channel $reason"
}