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 

Default ban mask @ command .kickban

 
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: Wed Dec 14, 2005 8:50 pm    Post subject: Default ban mask @ command .kickban Reply with quote

i have this code (adds handle at command .kickban (or .kb))
but i want the default banmask be *!*@fullhost and not *!*identd@*host. t. Without @nick at command

Code:
unbind dcc o|o kickban *dcc:kickban;
bind dcc o|o kb kban:kickban
 
proc kban:kickban {handle idx arg} {
 if {$arg == ""} {
  *dcc:kickban $handle $idx $arg
  return 0
 }
 set date [strftime %d/%m/%y]
 set defr "\002Banned 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
   }
   *dcc:kickban $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
   }
   *dcc:kickban $handle $idx "$host $t $handle:\002 $r"
  } {
   if {[set r [join [lrange [split $arg] 1 end]]] == ""} {
    set r $defr
   }
   *dcc:kickban $handle $idx "$host $handle:\002 $r"
  }
 }
}


Any Help? Very Happy
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Dec 14, 2005 9:54 pm    Post subject: Reply with quote

Quote:
.help kickban
### kickban [channel] [-|@]<nickname> [comment]
Kicks and bans a user from the specified channel with the with the
comment/reason given. Your handle will be attached to the ban in the
bot's internal ban list, and the ban will last for whatever time is set
for the channel's ban-time. The ban will be a channel-specific ban. Use
'.+ban' for a more permanent ban, which can be activated on every
channel the bot monitors. Appending a prefix of - or @ to a nickname
changes the banmask used:


For example, with a hostmask of nick!ident@host.name.domain:

Command Banmask
.kickban nick *!*dent@*.name.domain
.kickban -nick *!*dent@host.name.domain
.kickban @nick *!*@host.name.domain

Or with a host of nick!~ident@host.name.domain (strict-host set to 1):

Command Banmask
.kickban nick *!*ident@*.name.domain
.kickban -nick *!*ident@host.name.domain

See also: chanset, chaninfo, -ban, +ban, bans, stick

That means if you use @ before the nickname, it'll ban *!*@host.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Ni0
Voice


Joined: 12 Dec 2005
Posts: 13

PostPosted: Wed Dec 14, 2005 10:04 pm    Post subject: Reply with quote

yeap but i said i want this without the @ at command.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Dec 15, 2005 12:09 am    Post subject: Reply with quote

do not pass through default *dcc:kickban and use:
Code:

scan [getchanhost $nick] {%*[^@]@%s} host

_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Tue May 20, 2008 5:46 pm    Post subject: hi. Reply with quote

Hi everybody.

can fix this code for the last version of eggdrop 1.6.18?

Code:

unbind dcc o|o kickban *dcc:kickban;
bind dcc o|o kb kban:kickban
 
proc kban:kickban {handle idx arg} {
 if {$arg == ""} {
  *dcc:kickban $handle $idx $arg
  return 0
 }
 set date [strftime %d/%m/%y]
set nick [lindex $arg 0]
 set defr "\002Banned Without Reason"
set host [getchanhost $nick]
 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
   }
   *dcc:kickban $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
   }
   *dcc:kickban $handle $idx "$host $t $handle:\002 $r"
  } {
   if {[set r [join [lrange [split $arg] 1 end]]] == ""} {
    set r $defr
   }
   *dcc:kickban $handle $idx "$host $handle:\002 $r"
  }
 }
}


something wrong with this code, 'cause i put in partyline and:

Code:

<Nor7on> .kb testnick
<)Chasse> Invalid console channel.
<Nor7on> .kb #mychan testnick
<)Chasse> Invalid console channel.


when i put:

<Nor7on> .kb testnick #madrid

don't get error, but no found.

i want, when i put .kb nick, my eggdrop put ban(*!*@host.domain; perm) and kick in my channel.

can helpme?

thanks.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
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