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.

Problem with the Bots Ban mask

Old posts that have not been replied to for several years.
Locked
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Problem with the Bots Ban mask

Post by Sir_Fz »

Code: Select all

"ban" {
      if {(![matchattr $hand o|o $chan] && ![isop $nick $chan] && ![pub_issubop $usesubop $hand $chan]) || [ma$
        if {$::pub_setting(noticeacc)} { putserv "NOTICE $nick :This command requires Channel [expr {($usesubo$
        return
      }
      if {[pub_cc [set reason [join [lrange $extxt 2 end]]] ""]} {
        puthelp "NOTICE $nick :Usage: $prefix Ban <nick/host> <reason>"
        return  
      }  
      if {![pub_cm "*!*@*" $sindex1]} {
        set user $sindex1
        if {![matchattr $hand o|o $chan] && ![isop $nick $chan] && [isop $user $chan]} {
          pub_putmsg $chan "SubOps cannot ban ops."
          return
        }  
        if {![onchan $user $chan]} {
        pub_putmsg $chan "$user is not on $chan."
        return
      }
      if {![matchattr $hand o|o $chan] && ![isop $nick $chan]} {
        foreach u [chanlist $chan] {
          if {[isop $u $chan] && [pub_ncm $user $u![getchanhost $u]]} {
            pub_putmsg $chan "SubOps cannot ban ops."
            return
          }
        }
      }  
      pushmode $chan +b $user
    }
when i type on the main, "g ban nick" the bot bans *!ident@host even if the ident has ~ in it, so what i want is that the bot would ban *!*ident@host, can somebody fix it up for me ?[/code]
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

First, paste what is with the 'sindex1' and if it's the argument 1 of the command the use this: set mask "*!*@[lindex [split [getchanhost $sindex1] @] 1]"
Once the game is over, the king and the pawn go back in the same box.
M
Moo_Moo

Post by Moo_Moo »

Or you can just use:

Code: Select all

pushmode $chan +b [maskhost *[getchanhost $sindex1]]
$sindex1 being the nick of whoever you're banning.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Thanx, that worked perfectly now it bans *!*~ident/*!*ident@*.domain.com , but if I type : g ban *!*@domain.com will it ban the host ??
Locked