Guess the Topic say´s everything, i search for a script which takes the messages from rsyslog and post it.
I know you can use tcp/udp to use a rsylog on another server, but is there a way to use eggdrop too?
Code: Select all
23:18:37 < botty> <6>Apr 13 23:20:55 debian kernel: Kernel logging (proc) stopped.
23:18:39 < botty> <6>Apr 13 23:20:55 debian kernel: imklog 3.18.6, log source = /proc/kmsg started.
23:18:40 < botty> <46>Apr 13 23:20:55 debian rsyslogd: [origin software="rsyslogd" swVersion="3.18.6"
x-pid="2499" x-info="http://www.rsyslog.com"] exiting on signal 15.
23:18:40 < botty> <46>Apr 13 23:20:55 debian rsyslogd: [origin software="rsyslogd" swVersion="3.18.6"
x-pid="2520" x-info="http://www.rsyslog.com"] restart
Code: Select all
tomekk@debian:~/eggdrop# netstat -tpan | grep 1444
tcp 0 0 10.0.1.1:1444 0.0.0.0:* LISTEN 31307/eggdrop
tcp 0 0 10.0.1.1:1444 10.0.1.14:33671 ESTABLISHED31307/eggdrop
Code: Select all
tomekk@zlom:/# echo "teste me" | logger
Code: Select all
23:18:52 < botty> <13>Apr 13 23:21:11 debian logger: teste me
later...
23:41:08 < botty> <13>Apr 13 23:43:27 debian shutdown[2581]: shutting down for system halt
23:41:09 < botty> <30>Apr 13 23:43:27 debian init: Switching to runlevel: 0
Code: Select all
set port 1444
set host 10.0.1.1
##################################################################
bind evnt - prerehash prerehash_proc
set s_socket [socket -server socket_proc -myaddr $host $port]
proc prerehash_proc { type } {
global s_socket
close $s_socket
}
proc socket_proc { sock host port } {
fconfigure $sock -buffering line
fileevent $sock readable "action $sock $host $port"
}
proc action { chan host port } {
if {![eof $chan]} {
set data [gets $chan]
if {$data != ""} {
putquick "PRIVMSG #channel :$data"
}
} {
close $chan
}
}
Code: Select all
*.* @@10.0.1.1:1444