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 

script command to ban a wildcard ident and its host

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
BarGuy
Voice


Joined: 20 Aug 2019
Posts: 16

PostPosted: Thu Jan 16, 2020 9:42 pm    Post subject: script command to ban a wildcard ident and its host Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Fri Jan 17, 2020 12:04 am    Post subject: Re: script command to ban a wildcard ident and its host Reply with quote

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
View user's profile Send private message
BarGuy
Voice


Joined: 20 Aug 2019
Posts: 16

PostPosted: Fri Jan 17, 2020 11:58 am    Post subject: Reply with quote

got it figured out...

added
set banmask [lindex [split $uhost "@"] 1]
and changed $umask to $banmask
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Fri Jan 17, 2020 2:24 pm    Post subject: Reply with quote

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. Smile
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
View user's profile Send private message
BarGuy
Voice


Joined: 20 Aug 2019
Posts: 16

PostPosted: Fri Jan 17, 2020 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Jan 18, 2020 12:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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