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 

setban time script(Solved)

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


Joined: 23 Feb 2009
Posts: 201

PostPosted: Sat Nov 28, 2009 5:13 pm    Post subject: setban time script(Solved) Reply with quote

Hey im looking for a simple bit of scripting that will do the following set +b on a user and beable to set a ban time it will then message chanserv and chanserv will kick the user this is what im using at the moment just cant get the variable btime to to work

Code:
bind msg ho|ho bankick cmd:bankick
proc cmd:bankick {nick uhost hand arg} {
  set chan [lindex [split $arg] 0]
  set username [lindex [split $arg] 1]   
  set reason [lrange [split $arg] 2 end] 
  putserv "MODE $chan +b $username"
  putserv "PRIVMSG chanserv kick $chan $username $reason (Issued By $nick"   
}

_________________
Blake
UKEasyHosting UKStormWatch


Last edited by blake on Sun Nov 29, 2009 1:12 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sun Nov 29, 2009 10:33 am    Post subject: Reply with quote

It dosen't need a bantime but if one is given it will be <#chan> <nickname> <reason> <bantime>
Code:
 proc cmd:bankick {nick host hand text} {
  set chan [lindex [split $text] 0]
  set user [lindex [split $text] 1]
  set why [join [lrange [split $text] 2 end-1]]
  set chk [join [lrange [split $text] end end]]
  if {![regexp -- {^[0-9]} $chk]} {set why [join [lrange [split $text] 2 end]]} else {set bantime [join [lrange [split $text] end end]]}
   if {[info exists bantime]} {
    putserv "MODE $chan +b $user"
    putserv "PRIVMSG ChanServ KICK $chan $user $why) (Issued By $nick"
    timer $bantime [list putserv "MODE $chan -b $user"]
    return 1
   } else {
    putserv "MODE $chan +b $user"
    putserv "PRIVMSG ChanServ KICK $chan $user $why) (Issued By $nick"
    return 1
   }
 }

 bind msg ho|ho bankick cmd:bankick
The ChanServ KICK thing? is that suppose to be AKICK? if so you can make the bot remove the akick as well as the channel ban it places. Idea
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Sun Nov 29, 2009 1:05 pm    Post subject: Reply with quote

No just need the bot to set mode +b user message chanserv kick command so chanserv kicks out

_-4:53pm-_ * Botnick sets mode: +b Training_Drone1!*@*
_-4:53pm-_ * Training_Drone1 was kicked by testnetwork (You were banned from #TrainingRoom for impersonating a member of staff (15 minutes) (Issued By test)

the above is how it does it at the moment your script will enable us to use timed bans of 15 30 and 1 hour bans


Works a treat thanks TCL_no_TK appreciate it
_________________
Blake
UKEasyHosting UKStormWatch
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