egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

!Sapart Trigger Code Request

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Hero
Halfop


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Wed Jul 04, 2012 6:47 pm    Post subject: !Sapart Trigger Code Request Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Jul 05, 2012 8:56 am    Post subject: Reply with quote

Code:

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.
_________________
Once the game is over, the king and the pawn go back in the same box.


Last edited by caesar on Fri Jul 06, 2012 12:43 am; edited 1 time in total
Back to top
View user's profile Send private message
Hero
Halfop


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Thu Jul 05, 2012 3:14 pm    Post subject: Reply with quote

<Prince> [19:13:31] Tcl error [oper:sapart]: illegal channel: Hero
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jul 05, 2012 9:53 pm    Post subject: little isop help:) Reply with quote

the line throwing that error is:
Code:
if {![isop $chan $nick]} return

try just changing it to:
Code:
if {![isop $nick $chan]} return

GoodLuck:)
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
Hero
Halfop


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Fri Jul 06, 2012 2:19 am    Post subject: Reply with quote

Now This Error ....
<Prince> [06:17:21] Tcl error [oper:sapart]: can't read "message": no such variable
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Fri Jul 06, 2012 12:41 pm    Post subject: fix for next error Reply with quote

The line throwing that error is:
Code:
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:
putserv "SAPART $user $channel $reason"

GoodLuck:)
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
Hero
Halfop


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Fri Jul 06, 2012 1:11 pm    Post subject: Reply with quote

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" Smile

Waiting For Reply
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Fri Jul 06, 2012 1:40 pm    Post subject: I don't understand what the command should do:) Reply with quote

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^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Fri Jul 06, 2012 2:12 pm    Post subject: Let us just try this. Reply with quote

Maybe I do understand your last request... lets just try this:
Code:
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.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
Hero
Halfop


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Fri Jul 06, 2012 2:48 pm    Post subject: Reply with quote

Done!!!
Thanks Spike^^ And caesar Smile
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Jul 06, 2012 3:27 pm    Post subject: Reply with quote

You should consider adding a check on botnick as user like:
Code:

if {[isbotnick $user]} {
# do whatever you wish
return
}

that should be added before the:
Code:

if {[isop $user $chan]} {

line, else it will match that part first.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Hero
Halfop


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Fri Jul 06, 2012 3:51 pm    Post subject: Reply with quote

Ok
Back to top
View user's profile Send private message Visit poster's website
Hero
Halfop


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Sat Jul 21, 2012 4:02 pm    Post subject: Reply with quote

This Code No More Working When I Use Trigger Bot Dosent Reply Me
Code:
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"
}
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber