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 

/msg $botnick ban

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


Joined: 12 Dec 2005
Posts: 13

PostPosted: Mon Jun 26, 2006 5:39 pm    Post subject: /msg $botnick ban Reply with quote

Hello can anyone help me,and tell me how it's possible to do

/msg $botnick +ban #channel *@host.domain reason here

and the same with -ban command.


Edited Thanks .


Last edited by Ni0 on Mon Jun 26, 2006 7:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
phab
Voice


Joined: 22 Aug 2005
Posts: 12

PostPosted: Mon Jun 26, 2006 6:14 pm    Post subject: Reply with quote

Where should the bot know from, which channel the user should get banned? Or do you want a global ban on eggdrop?
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Tue Jun 27, 2006 3:43 am    Post subject: Reply with quote

just use any script that uses public commands, rebind to msg, cut off the channel and submit it as an argument to the public trigger Very Happy.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Ni0
Voice


Joined: 12 Dec 2005
Posts: 13

PostPosted: Fri Jun 30, 2006 8:34 am    Post subject: Reply with quote

Code:
unbind msg o|o +ban *msg:+ban;
bind msg o|o +ban msg:+ban;

proc msg:+ban {handle idx arg} {
 if {$arg == ""} {
  *msg:+ban $handle $idx $arg
  return 0
 }
 set date [strftime %d/%m/%y]
 set defr "Banned without reason"
 set host [lindex [split $arg] 0]
 if {[string first # [set c [lindex [split $arg] 1]]] == 0} {
  if {[string first % [set t [lindex [split $arg] 2]]] == 0} {
   if {[set r [join [lrange [split $arg] 3 end]]] == ""} {
    set r $defr
   }
   *msg:+ban $handle $idx "$host $c $t $handle:\002 $r"
  }
 } {
  if {[string first % [set t [lindex [split $arg] 1]]] == 0} {
   if {[set r [join [lrange [split $arg] 2 end]]] == ""} {
    set r $defr
   }
   *msg:+ban $handle $idx "$host $t $handle:\002 $r"
  } {
   if {[set r [join [lrange [split $arg] 1 end]]] == ""} {
    set r $defr
   }
   *msg:+ban $handle $idx "$host $handle:\002 $r"
  }
 }
}



Can anyone give me a little help to make it work on private message.
Back to top
View user's profile Send private message
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