| View previous topic :: View next topic |
| Author |
Message |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Sat Aug 22, 2020 10:11 am Post subject: |
|
|
the recvq is global for the server, the message could be in channel, in private or just sent to the server...
One day, I made a script to remove all glines so it did a lot of /gline -*@ip.address. It provocs exceed recvq without being on a channel. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Sat Aug 22, 2020 12:12 pm Post subject: |
|
|
Yeah, but how would i make the bot catch that global server notice, and make it put it on a channel?  _________________ ComputerTech |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Aug 22, 2020 6:24 pm Post subject: |
|
|
you cant cause when they get disconnected they get disconnected from server and not from specific channels
| ComputerTech wrote: | Yeah, but how would i make the bot catch that global server notice, and make it put it on a channel?  |
and what does: make it put it on a channel mean ? |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Sun Aug 23, 2020 5:23 pm Post subject: |
|
|
to output onto the channel using, e.g putserv  _________________ ComputerTech |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Sun Aug 23, 2020 5:47 pm Post subject: |
|
|
| ComputerTech wrote: | to output onto the channel using, e.g putserv  |
But WICH channel ? If you want to output on an admin channel, just define your channel in the script. Or hard-code it in your putserv.
Anyway, no script (or human oper) can see a recvq exceed and send a message to a channel in which was the killed user. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Tue Sep 08, 2020 10:36 am Post subject: |
|
|
Yeah, it seems i meant, that all kills made by the bot, will be sent to a specific channel.
E.g #admin will show all kills made by the eggdrop. so i changed your script to this.
| Code: |
namespace eval badguy {
variable bad
bind flud - pub flud:ban
proc flud:ban { n u h t c } {
if {(![info exists ::badguy::bad($u)])} { set ::badguy::bad($u) 0 }
incr ::badguy::bad($u)
switch $::badguy::bad($u) {
1 {
putquick "privmsg $n :You Are Flooding/Spamming, Please Stop Or You Will Be Network Banned"
putserv "privmsg #admin :warning, Flood Happening in $c By $n"
}
2 {
putquick "KILL $n Spamming is not allowed on TechNet"
putserv "privmsg #admin :Kill due to flood in $c By $n"
}
3 {
putnow "WHOIS $n"
unset ::badguy::bad($u)
}
}
return 1
}
bind raw - 378 flud:gline
proc flud:gline {from kw text} {
set host [lindex [split $text " "] end]
putnow "gzline *@$host +30m :Network flood"
putserv "privmsg #admin :Gzline, Flood Happening in $c By $n"
}
}
|
I havent tested it yet, but will in a few  _________________ ComputerTech |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Tue Sep 08, 2020 12:04 pm Post subject: |
|
|
Your privmsg in flud:gline proc won't work.
$c (I guess channel) and $n (nick ?) aren't defined.
You can peharps get nick fro $text (not really remember how is the raw 378 format), but you'll NEVER got the channel. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Tue Sep 08, 2020 3:17 pm Post subject: |
|
|
Oh, i did not notice that CrazyCat, thank you for pointing that out
i guess i will do without pm'g #admin the origin channel on flud-gline *shrug*
Thanks Again CrazyCat _________________ ComputerTech |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Thu Sep 24, 2020 8:45 pm Post subject: |
|
|
Is it possible to add a check, that makes the bot part the channel if no flood has happened in like 5 days, the bot will automatically part the channel, how can i add this?  _________________ ComputerTech |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Fri Sep 25, 2020 4:40 am Post subject: |
|
|
It is possible, here is a short solution:
| Code: | setudef flag fludctrl
setudef int fludlast
set fluddelay 5 #in days
bind cron - "*/10 * * * *" fludcheck
proc fludcheck {min hour day month wd} {
set delay [expr {$::fluddelay * 86400}]
set now [clock seconds]
foreach chan [channels] {
if {[channel get $chan fludctrl] == 0} { continue }
if {[channel get $chan fludlast]<[expr {$now - $delay}]} {
channel remove $chan
}
}
} |
You will have to modify your flud:ban procedure:
| Code: | proc flud:ban { n u h t c } {
channel set $c fludlast [clock seconds]
if {(![info exists ::badguy::bad($u)])} { set ::badguy::bad($u) 0 }
... |
And when you add a chan to monitor, you'll have to enable the fludctrl option on it: .chanset #channel +fludctrl
This is to allow you to have channels where the bot will stay, even if there are no flood in it.
Each time there flood is detected in $chan, the channel setting "fludlast" will have the timestamp of the last detection.
Each 10 minutes, the eggdrop will compare (for each monitored channel) the value of fludlast and the current time. If fludlast is older than 5 days, the channel is removed from the eggdrop records.
Not tested  _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Fri Sep 25, 2020 9:32 am Post subject: |
|
|
Wow, that's much better than i thought it would be, Thank you CrazyCat,
i will test it right away  _________________ ComputerTech |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Sun Sep 27, 2020 3:08 pm Post subject: |
|
|
That worked Great CrazyCat, thanks a lot  _________________ ComputerTech |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Sun Nov 15, 2020 10:51 am Post subject: |
|
|
Would this work?
| Code: |
namespace eval badguy {
bind pub !gzline the:gzline
proc the:gzline {nick host hand chan text} {
set bnick [lindex [split $text] 0 ]
putserv "PRIVMSG $chan :GZline'n $bnick"
putnow "WHOIS $bnick"
}
return 1
bind raw - 378 flud:gline
proc flud:gline {from kw text} {
set host [lindex [split $text " "] end]
putnow "gzline *@$host +30m :Breakage of Network Policy"
}
}
|
Not sure tbh, how to call proc flud:gline to use the whois raw  _________________ ComputerTech |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sun Nov 15, 2020 2:33 pm Post subject: |
|
|
I don't know yet if it will work. But here are a couple things that I did notice.
| Code: |
bind pub !gzline the:gzline
|
Flags is missing.
Also, need to call the proc including the namespace:
badguy::the:gzline
bind raw - 378 flud:gline
Same. Need to call the proc using the namespace name.
Question:
Are you sure that raw 378 is what you want?
Something to consider:
Use a utimer to unbind that bind raw after xx seconds. This way it is not
operational all the time. Can't accidentally trigger. _________________ 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 |
|
 |
Armide83 Voice
Joined: 22 Dec 2020 Posts: 1
|
Posted: Tue Dec 22, 2020 4:11 pm Post subject: |
|
|
| ComputerTech wrote: | Hmm, i guessed that, what of the notice or excessive flood, can it be noticed to a particular channel?
for example
Excessive Flood by guest123
on #test
Guest123 did Excessive transfers Dieppe
that possible?
to catch the notice, and project to a specified channel |
I don't understand, how can it be noticed on a particular channel? |
|
| Back to top |
|
 |
|