This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Getting error while trying to ban s.o.

Old posts that have not been replied to for several years.
Locked
D
DeLiRiUm

Getting error while trying to ban s.o.

Post by DeLiRiUm »

The Bot always tries to ban himself while executing this thing:

Code: Select all

proc kickban {nick uhost hand chan arg} { 
  global action
  global act_chan
  if {([isop $nick $action]) || ([isvoice $nick $action])} {
  set user [lindex $arg 0] 
  set reason [lindex $arg 1] 
  set creator OLGBot
  set bantime 2  
  newchanban $act_chan [maskhost "$user!*@*"] $creator $reason $bantime
  putkick $act_chan $user "$reason"
  return 1
  }
  }
I use the Syntax .b <user> <reason>

What am i doing wrong?

Thanx in advance.

Felix
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

use *!*@[lindex [split [getchanhost $user $act_chan] @] 1] instead of [maskhost "$user!*@*"]
D
DeLiRiUm

Post by DeLiRiUm »

But my Problem is, that we use an Webchat on our IRC Net. That means everyone has the same Hostmask and only the Idents change. So it is necessary to only ban the Nickname

Greetz
Felix
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

ok then $user![getchanhost $user $act_chan] should do it, which will ban nick!ident@host
D
DeLiRiUm

Post by DeLiRiUm »

That worked. Thank you very much.
Locked