| View previous topic :: View next topic |
| Author |
Message |
BarGuy Voice
Joined: 20 Aug 2019 Posts: 16
|
Posted: Thu Jan 16, 2020 9:42 pm Post subject: script command to ban a wildcard ident and its host |
|
|
| so Im using script to ban someone who is on a ramage for some reason... the script Im using was banning the nick, but I changed it to ban the host ---> putquick "MODE $chan +b $uhost" <--- however its also banning the ident as well.. (ie itsme@123.456.789) how can I change that ban type so its a ban like *@123.456.789 |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Fri Jan 17, 2020 12:04 am Post subject: Re: script command to ban a wildcard ident and its host |
|
|
| BarGuy wrote: | ... how can I change that ban type so its a ban like *@123.456.789
|
Visit :
https://docs.eggheads.org/mainDocs/tcl-commands.html#maskhost-nick-user-host-masktype
and see if the command and info describing it found there is helpful to you.
Experiment with it some. _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
BarGuy Voice
Joined: 20 Aug 2019 Posts: 16
|
Posted: Fri Jan 17, 2020 11:58 am Post subject: |
|
|
got it figured out...
added
set banmask [lindex [split $uhost "@"] 1]
and changed $umask to $banmask |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Fri Jan 17, 2020 2:24 pm Post subject: |
|
|
| BarGuy wrote: | got it figured out...
added
set banmask [lindex [split $uhost "@"] 1]
and changed $umask to $banmask |
It depends on what you need and/or are satisfied with. If you've got it to suit you, all well and good.
However, the code you've posted won't produce what you asked for.
| Quote: |
... so its a ban like *@123.456.789 ...
|
It will produce just the part to the right of the @ .
If you want a banmask like :
*!*@something.something
then there are a couple ways to achieve it.
Play with this in some test channel of yours. It will make the difference real clear. Then decide what you want / need.
| Code: |
#
# Jan. 17, 2020
#
# http://forum.egghelp.org/viewtopic.php?t=20704
#
#
#####
bind pub - "!foo" mask_host_experiment
proc mask_host_experiment {nick uhost handle chan text} {
putserv "privmsg $chan : "
putserv "privmsg $chan :nick is: $nick - - - uhost is: $uhost "
putserv "privmsg $chan : "
set banmask [lindex [split $uhost "@"] 1]
putserv "privmsg $chan :banmask is: $banmask"
putserv "privmsg $chan : "
set another_banmask [maskhost $nick!$uhost 2]
putserv "privmsg $chan :another_banmask is: $another_banmask "
}
|
I hope this helps. _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
BarGuy Voice
Joined: 20 Aug 2019 Posts: 16
|
Posted: Fri Jan 17, 2020 9:16 pm Post subject: |
|
|
| Quote: |
However, the code you've posted won't produce what you asked for.
... so its a ban like *@123.456.789 ...
It will produce just the part to the right of the @ .
If you want a banmask like :
*!*@something.something
then there are a couple ways to achieve it.
|
Actually it did exactly what we were looking for (11:05:42] * BarBot sets mode: +b *!*@89.249.65.30)
But thanks for the additional help |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sat Jan 18, 2020 12:40 am Post subject: |
|
|
| BarGuy wrote: |
...
Actually it did exactly what we were looking for (11:05:42] * BarBot sets mode: +b *!*@89.249.65.30)
|
Ok. I'm glad you're getting the ban you wanted then. Apparently the irc server does some interpreting of what is sent to it, and adds the leading *!*@ on it's own. _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
|