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 

ban msg problem

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
.pt
Halfop


Joined: 16 Nov 2005
Posts: 71

PostPosted: Thu Feb 23, 2006 6:44 pm    Post subject: ban msg problem Reply with quote

Code:
"b" {
   if {![check:auth $nick $hand]} { return 0 }
   if {[lindex [split $arg] 1] == ""} {
    puthelp "NOTICE $nick :SYNTAX: $fzcom(trigger)b <nick1/ban1,nick2/ban2,..> \[reason\] \[bantime\]."
    return 0
   }
   set knicks [split [lindex [split $arg] 1] ,]
   if {[llength [lrange [split $arg] 2 end]] == 1} {
    if {[string is integer [lindex [split $arg] end]]} {
     set kreason "Requested by $nick."
     set btime "[lindex [split $arg] end]"
    } else {
     set kreason "($nick) [join [lrange [split $arg] 2 end]]"
     set btime "$fzcom(btime)"
    }
   } elseif {[llength [lrange [split $arg] 2 end]] > 1} {
    if {[string is integer [lindex [split $arg] end]]} {
     set kreason "($nick) [join [lrange [split $arg] 2 end-1]]"
     set btime "[lindex [split $arg] end]"
    } else {
     set kreason "($nick) [join [lrange [split $arg] 2 end]]"
     set btime "$fzcom(btime)"
    }
   } else {
    set kreason "Requested by $nick."
    set btime "$fzcom(btime)"
   }
   foreach knick $knicks {
    if {[string match -nocase *!*@* $knick]} {
     if {![string match -nocase $knick $botname]} {
      newchanban $chan $knick $nick "$kreason" $btime
      lappend ibanned $knick
     } else {
      puthelp "NOTICE $nick :Can't outsmart me, I won't ban myself."
     }
    } else {
     if {![isbotnick $knick] && ![matchattr [nick2hand $knick] mo|mo $chan]} {
      if {[onchan $knick $chan]} {
       newchanban $chan [set bmask [cmdbtype $knick![getchanhost $knick $chan] $fzcom(btype)]] $nick "$kreason" $btime
       lappend ibanned "$knick ($bmask)"
      } else {
       puthelp "NOTICE $nick :$knick is not on $chan."
      }
     } else {
      puthelp "NOTICE $nick :Can't outsmart me, no banning a master."
     }
    }
   }
   if {[info exists ibanned]} {
    foreach wribanned [wordwrap [join $ibanned ,] 70 ,] {
     puthelp "NOTICE $nick :Added $wribanned to my $chan banlist."
    }
    flushmode $chan
   }
   return 0
  }


---------------------------------------------------------------------------------------
when i do .b nick msg time or .b nick msg the kick reason its always the ban time instead of the msg i put on it
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Feb 23, 2006 8:48 pm    Post subject: Reply with quote

That's a rip of my fzcommands.tcl, use the original one.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Feb 23, 2006 9:58 pm    Post subject: Reply with quote

@ .pt

Use code tags in future when posting code.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
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 -> Scripting Help 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