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 

Bombscript with revenge mode
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
SpiKe^^
Owner


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

PostPosted: Sun Feb 22, 2015 12:20 pm    Post subject: Reply with quote

Quote:
is it possible to protect users from a bomb? i dont want: !bomb Bot


The script already tries to do this, but is done badly/incorrectly.
The script confuses nick with handle, they are not always the same thing:)

Have you added all the other bots (with +b) to the bot running the timebomb script?
_________________
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
langer_hans
Voice


Joined: 19 Feb 2015
Posts: 13

PostPosted: Sun Feb 22, 2015 2:35 pm    Post subject: Reply with quote

i have only one bot
Back to top
View user's profile Send private message
SpiKe^^
Owner


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

PostPosted: Sun Feb 22, 2015 2:41 pm    Post subject: Reply with quote

This might be a more correct way to prove nicks before continuing.

Replace the existing proc doTimebomb with this...

Code:

proc doTimebomb {nick uhost hand chan arg} {
  global botnick
  set theNick $nick

  set arg [split [string trim $arg]]
  if {[llength $arg] == 1} {
    set theNick [lindex $arg 0]
  }

  if {[string tolower $theNick] == [string tolower $botnick]} {
    IRCKick $nick $chan "I will not tollerate this!"
    return
  }

  set hn [nick2hand $theNick $chan]

  if {$hn == ""} {
    IRCPrivMSG $chan "$theNick is not on $chan"
    return
  }

  if {$hn != "*" && [matchattr $hn "b|b" $chan]} {
    IRCKick $nick $chan "I will not tollerate that!"
    return
  }

  StartTimeBomb $nick $theNick $chan
}



Test that out and verify you can not timebomb the bot.
_________________
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
langer_hans
Voice


Joined: 19 Feb 2015
Posts: 13

PostPosted: Mon Feb 23, 2015 1:28 am    Post subject: Reply with quote

very nice, works great.


[06:26:50] <@user1> !bomb Bot
[06:26:52] * You were kicked by Bot (I will not tollerate this!)


Last edited by langer_hans on Mon Feb 23, 2015 10:20 am; edited 1 time in total
Back to top
View user's profile Send private message
caesar
Mint Rubber


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

PostPosted: Mon Feb 23, 2015 5:17 am    Post subject: Reply with quote

Quote:

if {[string tolower $theNick] == [string tolower $botnick]} {

really? why don't you use built-in isbotnick function?
Anyway.. how about:
Code:

proc doTimebomb {nick uhost hand chan text} {
   if {[scan $text {%s} who] != 1} {
      set theNick $nick
   } else {
      set theNick $who
   }
   if {![onchan $theNick]} {
      IRCPrivMSG $chan "$theNick is not on $chan"
      return 
   }
   set hn [nick2hand $theNick $chan]   
   if {[isbotnick $theNick] || [matchattr $hn "b|b" $chan]} {
      IRCKick $nick $chan "I will not tollerate that!"
      return
  }
   StartTimeBomb $nick $theNick $chan
}

_________________
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
SpiKe^^
Owner


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

PostPosted: Mon Feb 23, 2015 9:18 am    Post subject: Reply with quote

That part worked, I left it as it was:)
_________________
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
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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