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 

Script...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
ProXy
Op


Joined: 11 Aug 2002
Posts: 126

PostPosted: Fri Aug 23, 2002 10:50 am    Post subject: Script... Reply with quote

Hi, I now, nobody will write a ready-to-go script for me, so i started to write a little one, that should offer the public command: !lamer <nick> <timeforban>

The Script is nearly working but if i enter a time the timer always makes an error or it simply doesn`t kick the user. Could please anyone check what`s the error in this source?

Code:
bind pub o|o !lamer pub:lamer
proc pub:lamer { nick uhost handle channel arg } {
global botnick
   if {([llength $arg]==0) || ([lsearch [string tolower [chanlist $channel]] [string tolower [lindex $arg 0]]]==-1) || (![string is digit [lindex $arg 1]])} {
      putserv "PRIVMSG $channel :Usage: !lamer <nick> [time]"
   } elseif {![botisop $channel]} {
      putserv "PRIVMSG $channel :$nick: Ja, du Scherzkeks, dann gib mir OP!"
   } elseif {$botnick==$arg} {
      putserv "PRIVMSG $channel :$nick: So blöd bin ich nun wirklich nicht..."
   } else {
      if {[string is digit [lindex $arg 1]]} {
         set bantime [lindex $arg 1]
      } else {
         set bantime 10
      }
      set host [getchanhost $arg $channel]
      putserv "MODE $channel +b $arg!$host"
      utimer 2 "putkick $channel $arg lamer"
      timer $bantime "putserv \"MODE $channel -b $arg!$host\""
   }
}
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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