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 

Kill 1st Gline 2nd
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sat Aug 22, 2020 10:11 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Sat Aug 22, 2020 12:12 pm    Post subject: Reply with quote

Yeah, but how would i make the bot catch that global server notice, and make it put it on a channel? Confused
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Sat Aug 22, 2020 6:24 pm    Post subject: Reply with quote

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? Confused


and what does: make it put it on a channel mean ?
Back to top
View user's profile Send private message
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Sun Aug 23, 2020 5:23 pm    Post subject: Reply with quote

to output onto the channel using, e.g putserv Razz
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sun Aug 23, 2020 5:47 pm    Post subject: Reply with quote

ComputerTech wrote:
to output onto the channel using, e.g putserv Razz

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
View user's profile Send private message Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Tue Sep 08, 2020 10:36 am    Post subject: Reply with quote

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 Razz
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Tue Sep 08, 2020 12:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Tue Sep 08, 2020 3:17 pm    Post subject: Reply with quote

Oh, i did not notice that CrazyCat, thank you for pointing that out Very Happy

i guess i will do without pm'g #admin the origin channel on flud-gline *shrug*

Thanks Again CrazyCat
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Thu Sep 24, 2020 8:45 pm    Post subject: Reply with quote

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? Confused
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Fri Sep 25, 2020 4:40 am    Post subject: Reply with quote

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 Smile
_________________
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
View user's profile Send private message Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Fri Sep 25, 2020 9:32 am    Post subject: Reply with quote

Wow, that's much better than i thought it would be, Thank you CrazyCat,
i will test it right away Very Happy Very Happy
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Sun Sep 27, 2020 3:08 pm    Post subject: Reply with quote

That worked Great CrazyCat, thanks a lot Very Happy Very Happy Very Happy
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Sun Nov 15, 2020 10:51 am    Post subject: Reply with quote

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 Confused
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sun Nov 15, 2020 2:33 pm    Post subject: Reply with quote

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


Joined: 22 Dec 2020
Posts: 1

PostPosted: Tue Dec 22, 2020 4:11 pm    Post subject: Reply with quote

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
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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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