Eggdrop
Eggdrop is the oldest Internet Relay Chat (IRC) bot still in active development.
Install tcllib and tls and pycryptodome
Compile eggdrop from source
Setup your eggdrop
Scripts
Rehash script
Show network bandwidth from proc
bind pub - "!bww" bandwidth_check
proc bandwidth_check {nick host handle chan text} {
set iface "eno1"
set data1 [exec awk -v iface=$iface {$1 ~ iface {gsub(/:/,"",$1); print $2, $10}} /proc/net/dev]
foreach {rx1 tx1} $data1 {}
after 1000
set data2 [exec awk -v iface=$iface {$1 ~ iface {gsub(/:/,"",$1); print $2, $10}} /proc/net/dev]
foreach {rx2 tx2} $data2 {}
set rxkbs [expr {($rx2 - $rx1) / 1024}]
set txkbs [expr {($tx2 - $tx1) / 1024}]
puthelp "PRIVMSG $chan :Bandwidth on $iface → Download: ${rxkbs} KB/s | Upload: ${txkbs} KB/s"
}
Allow a specifik user to be invited only
bind msg - "!invite" invite_cmd
proc invite_cmd {nick uhost handle text} {
set allowed_user "wuseman"
set target_channel "#-GreyZone-"
if { [string tolower $nick] != [string tolower $allowed_user] } {
return
}
# Check if the command is sent via private message, not in a channel
if {![string match "#*" $text]} {
putserv "INVITE $nick $target_channel"
putserv "PRIVMSG $nick :You have been invited to $target_channel."
}
}
Automatically start eggdrop at boot
Add the following to /etc/init.d/eggdrop
Resource(s)