Rewrites, it now uses 100% bash instead of sneaking some perl stuff in. Calling the bot by name is broken atm though.
This commit is contained in:
parent
2ffd9ae28f
commit
f7abf132ce
2
bot.cfg
2
bot.cfg
@ -2,6 +2,8 @@
|
||||
channel=(
|
||||
"a11y"
|
||||
)
|
||||
# The date format for log entries. man date for details.
|
||||
dateFormat='%B %d, %I:%m%P'
|
||||
# Greet people who enter the channel? (true/false)
|
||||
# Configure greetings in triggers/greet/greet.sh
|
||||
greet=true
|
||||
|
90
bot.sh
90
bot.sh
@ -6,102 +6,106 @@ input=".botinput"
|
||||
|
||||
close_bot()
|
||||
{
|
||||
echo -en ":QUIT :$quitMessage\r\n" >> "$input"
|
||||
echo -en "QUIT :$quitMessage\r\n" >> "$input"
|
||||
rm "$input"
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap close_bot EXIT $?
|
||||
|
||||
echo "Starting session: $(date "+[%y:%m:%d %T]")" | tee $log
|
||||
echo "NICK $nick" > $input
|
||||
echo "USER $user" >> $input
|
||||
echo "Session started $(date "+%I:%M%p%n %A, %B %d, %Y")" | tee "$log"
|
||||
echo "NICK $nick" | tee "$input"
|
||||
echo "USER $user" | tee -a "$input"
|
||||
for c in ${channel[@]} ; do
|
||||
echo "JOIN #$c" | tee -a $input
|
||||
echo "JOIN #$c" | tee -a "$input"
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
tail -f $input | telnet $server $port | while read res
|
||||
tail -f "$input" | telnet "$server" "$port" | while read result
|
||||
do
|
||||
# log the session
|
||||
echo "$(date "+[%y:%m:%d %T]")$res" | tee -a $log
|
||||
echo "$(date "+[$dateFormat]") $result" | tee -a "$log"
|
||||
# do things when you see output
|
||||
case "$res" in
|
||||
case "$result" in
|
||||
# respond to ping requests from the server
|
||||
PING*)
|
||||
echo "$res" | sed "s/I/O/" >> $input
|
||||
echo "$result" | tee -a "$log"
|
||||
echo "${result/I/O}" | tee -a "$input"
|
||||
;;
|
||||
# for pings on nick/user
|
||||
*"You have not"*)
|
||||
echo "JOIN #$channel" >> $input
|
||||
echo "JOIN #$channel" | tee -a "$input"
|
||||
;;
|
||||
# run when someone joins
|
||||
*"JOIN :#"*)
|
||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
||||
chan="#$chan"
|
||||
who="${result%%!*}"
|
||||
who="${who:1}"
|
||||
from="${result#*#}"
|
||||
from="#$from"
|
||||
if [ "$who" = "$nick" ]; then
|
||||
continue
|
||||
fi
|
||||
echo "MODE #$channel +o $who" >> $input
|
||||
echo "MODE #$channel +o $who" | tee -a "$input"
|
||||
if [ "${greet^^}" = "TRUE" ]; then
|
||||
./triggers/greet/greet.sh $who $chan
|
||||
./triggers/greet/greet.sh "$who" "$from"
|
||||
fi
|
||||
;;
|
||||
# run when someone leaves
|
||||
*"PART #"*)
|
||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
||||
chan="#$chan"
|
||||
who="${result%%!*}"
|
||||
who="${who:1}"
|
||||
from="${result#*#}"
|
||||
from="#$from"
|
||||
if [ "$who" = "$nick" ]; then
|
||||
continue
|
||||
fi
|
||||
echo "MODE #$channel +o $who" >> $input
|
||||
if [ "${leave^^}" = "TRUE" ]; then
|
||||
./triggers/bye/bye.sh $who $chan
|
||||
./triggers/bye/bye.sh "$who" "$from"
|
||||
fi
|
||||
;;
|
||||
# run when a message is seen
|
||||
*PRIVMSG*)
|
||||
echo "$res"
|
||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
||||
from=$(echo "$res" | perl -pe "s/.*PRIVMSG (.*[#]?([a-zA-Z]|\-)*) :.*/\1/")
|
||||
# This looks to be the spot where triggers should be called
|
||||
echo "$result" | tee -a "$log"
|
||||
who="${result%%!*}"
|
||||
who="${who:1}"
|
||||
from="${result#*#}"
|
||||
from="#${from%% *}"
|
||||
# Trigger stuff happens here.
|
||||
# Call link trigger if msg contains a link:
|
||||
if [[ "$res" =~ .*http://|https://|www\..* ]]; then
|
||||
./triggers/link/link.sh "$who" "$from" "$res"
|
||||
if [[ "$result" =~ .*http://|https://|www\..* ]]; then
|
||||
./triggers/link/link.sh "$who" "$from" "$result"
|
||||
# Although this calls modules, it triggers on text other than the bot's nick
|
||||
elif [[ "$res" =~ ^.*PRIVMSG.*:[[:punct:]].* ]]; then
|
||||
com="${res#*:[[:punct:]]}"
|
||||
com="${com//# /}"
|
||||
will="${com#* }"
|
||||
com="${com%% *}"
|
||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
||||
elif [[ "$result" =~ ^.*PRIVMSG.*:[[:punct:]].* ]]; then
|
||||
command="${result#*:[[:punct:]]}"
|
||||
command="${command//# /}"
|
||||
will="${command#* }"
|
||||
command="${command%% *}"
|
||||
if [ -z "$(ls modules/ | grep -i -- "$command")" ] || [ -z "$command" ]; then
|
||||
continue
|
||||
fi
|
||||
./modules/${com% *}/${com% *}.sh "$who" "$from" "$will"
|
||||
./modules/${command% *}/${command% *}.sh "$who" "$from" "$will"
|
||||
else
|
||||
./triggers/keywords/keywords.sh "$who" "$from" "$res"
|
||||
./triggers/keywords/keywords.sh "$who" "$from" "$result"
|
||||
fi
|
||||
# "#" would mean it's a channel
|
||||
if [ "$(echo "$from" | grep '#')" ]; then
|
||||
test "$(echo "$res" | grep ":$nick:")" || continue
|
||||
will=$(echo "$res" | perl -pe "s/.*:$nick:(.*)/\1/")
|
||||
test "$(echo "$result" | grep ":$nick:")" || continue
|
||||
will="${result#*"${nick}":}"
|
||||
else
|
||||
will=$(echo "$res" | perl -pe "s/.*$nick :(.*)/\1/")
|
||||
will="${result#*"${nick}" :}"
|
||||
from=$who
|
||||
fi
|
||||
will=$(echo "$will" | perl -pe "s/^ +//")
|
||||
com=$(echo "$will" | cut -d " " -f1)
|
||||
will="${will//# /}"
|
||||
command="${will%% *}"
|
||||
will="${will#* }"
|
||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
||||
./modules/help/help.sh "$who" "$from"
|
||||
continue
|
||||
fi
|
||||
./modules/$com/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99)
|
||||
./modules/$command/$command.sh "$who" "$from" "$will"
|
||||
;;
|
||||
*)
|
||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
||||
chan="#$chan"
|
||||
echo "$res"
|
||||
echo "$result" | tee -a log
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
107
bot.sh.bak
Executable file
107
bot.sh.bak
Executable file
@ -0,0 +1,107 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
[ -f bot.cfg ] && source bot.cfg
|
||||
input=".botinput"
|
||||
|
||||
close_bot()
|
||||
{
|
||||
echo -en ":QUIT :$quitMessage\r\n" >> "$input"
|
||||
rm "$input"
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap close_bot EXIT $?
|
||||
|
||||
echo "Starting session: $(date "+[%y:%m:%d %T]")" | tee $log
|
||||
echo "NICK $nick" > $input
|
||||
echo "USER $user" >> $input
|
||||
for c in ${channel[@]} ; do
|
||||
echo "JOIN #$c" | tee -a $input
|
||||
done
|
||||
|
||||
tail -f $input | telnet $server $port | while read res
|
||||
do
|
||||
# log the session
|
||||
echo "$(date "+[%y:%m:%d %T]")$res" | tee -a $log
|
||||
# do things when you see output
|
||||
case "$res" in
|
||||
# respond to ping requests from the server
|
||||
PING*)
|
||||
echo "$res" | sed "s/I/O/" >> $input
|
||||
;;
|
||||
# for pings on nick/user
|
||||
*"You have not"*)
|
||||
echo "JOIN #$channel" >> $input
|
||||
;;
|
||||
# run when someone joins
|
||||
*"JOIN :#"*)
|
||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
||||
chan="#$chan"
|
||||
if [ "$who" = "$nick" ]; then
|
||||
continue
|
||||
fi
|
||||
echo "MODE #$channel +o $who" >> $input
|
||||
if [ "${greet^^}" = "TRUE" ]; then
|
||||
./triggers/greet/greet.sh $who $chan
|
||||
fi
|
||||
;;
|
||||
# run when someone leaves
|
||||
*"PART #"*)
|
||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
||||
chan="#$chan"
|
||||
if [ "$who" = "$nick" ]; then
|
||||
continue
|
||||
fi
|
||||
echo "MODE #$channel +o $who" >> $input
|
||||
if [ "${leave^^}" = "TRUE" ]; then
|
||||
./triggers/bye/bye.sh $who $chan
|
||||
fi
|
||||
;;
|
||||
# run when a message is seen
|
||||
*PRIVMSG*)
|
||||
echo "$res"
|
||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
||||
from=$(echo "$res" | perl -pe "s/.*PRIVMSG (.*[#]?([a-zA-Z]|\-)*) :.*/\1/")
|
||||
# This looks to be the spot where triggers should be called
|
||||
# Call link trigger if msg contains a link:
|
||||
if [[ "$res" =~ .*http://|https://|www\..* ]]; then
|
||||
./triggers/link/link.sh "$who" "$from" "$res"
|
||||
# Although this calls modules, it triggers on text other than the bot's nick
|
||||
elif [[ "$res" =~ ^.*PRIVMSG.*:[[:punct:]].* ]]; then
|
||||
com="${res#*:[[:punct:]]}"
|
||||
com="${com//# /}"
|
||||
will="${com#* }"
|
||||
com="${com%% *}"
|
||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
||||
continue
|
||||
fi
|
||||
./modules/${com% *}/${com% *}.sh "$who" "$from" "$will"
|
||||
else
|
||||
./triggers/keywords/keywords.sh "$who" "$from" "$res"
|
||||
fi
|
||||
# "#" would mean it's a channel
|
||||
if [ "$(echo "$from" | grep '#')" ]; then
|
||||
test "$(echo "$res" | grep ":$nick:")" || continue
|
||||
will=$(echo "$res" | perl -pe "s/.*:$nick:(.*)/\1/")
|
||||
else
|
||||
will=$(echo "$res" | perl -pe "s/.*$nick :(.*)/\1/")
|
||||
from=$who
|
||||
fi
|
||||
will=$(echo "$will" | perl -pe "s/^ +//")
|
||||
com=$(echo "$will" | cut -d " " -f1)
|
||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
||||
./modules/help/help.sh "$who" "$from"
|
||||
continue
|
||||
fi
|
||||
./modules/$com/$com.sh $who $from $(echo "$will" | cut -d " " -f2-99)
|
||||
;;
|
||||
*)
|
||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
||||
chan="#$chan"
|
||||
echo "$res"
|
||||
;;
|
||||
esac
|
||||
done
|
153
log
Normal file
153
log
Normal file
@ -0,0 +1,153 @@
|
||||
Trying 163.172.137.39...
|
||||
Connected to irc.netwirc.tk.
|
||||
Escape character is '^]'.
|
||||
:nuclear.netwirc.tk NOTICE * :*** Looking up your hostname...
|
||||
:nuclear.netwirc.tk NOTICE * :*** Couldn't resolve your hostname; using your IP address instead
|
||||
:nuclear.netwirc.tk 001 storm_bot :Welcome to the NetwIRC IRC Network storm_bot!storm_bot@137.118.216.238
|
||||
:nuclear.netwirc.tk 002 storm_bot :Your host is nuclear.netwirc.tk, running version UnrealIRCd-4.0.5
|
||||
:nuclear.netwirc.tk 003 storm_bot :This server was created Sat Jul 30 2016 at 18:16:53 UTC
|
||||
:nuclear.netwirc.tk 004 storm_bot nuclear.netwirc.tk UnrealIRCd-4.0.5 iowrsxzdHtIRqpWGTSB lvhopsmntikraqbeIzMQNRTOVKDdGLPZSCcf
|
||||
:nuclear.netwirc.tk 005 storm_bot CMDS=USERIP,STARTTLS,KNOCK,DCCALLOW,MAP UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=25 CHANLIMIT=#:25 MAXLIST=b:60,e:60,I:60 MAXNICKLEN=30 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 :are supported by this server
|
||||
:nuclear.netwirc.tk 005 storm_bot AWAYLEN=307 MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kLf,l,psmntirzMQNRTOVKDdGPZSCc NETWORK=NetwIRC CASEMAPPING=ascii EXTBAN=~,SOcaRrnqj :are supported by this server
|
||||
:nuclear.netwirc.tk 005 storm_bot ELIST=MNUCT STATUSMSG=~&@%+ EXCEPTS INVEX :are supported by this server
|
||||
:nuclear.netwirc.tk 396 storm_bot 6A229115.A61C7C6C.37E689BC.IP :is now your displayed host
|
||||
:nuclear.netwirc.tk 251 storm_bot :There are 1 users and 33 invisible on 4 servers
|
||||
:nuclear.netwirc.tk 252 storm_bot 9 :operator(s) online
|
||||
:nuclear.netwirc.tk 254 storm_bot 9 :channels formed
|
||||
:nuclear.netwirc.tk 255 storm_bot :I have 17 clients and 3 servers
|
||||
:nuclear.netwirc.tk 265 storm_bot 17 21 :Current local users 17, max 21
|
||||
:nuclear.netwirc.tk 266 storm_bot 34 40 :Current global users 34, max 40
|
||||
:nuclear.netwirc.tk 422 storm_bot :MOTD File is missing
|
||||
:storm_bot MODE storm_bot :+iwx
|
||||
:nuclear.netwirc.tk 332 storm_bot #a11y :Welcome to #a11y, because we are more than this!
|
||||
:nuclear.netwirc.tk 333 storm_bot #a11y Jeremiah 1472770664
|
||||
:nuclear.netwirc.tk 353 storm_bot = #a11y :storm_bot xogium xogium_ mariachiac @chrys @storm_dragon Tsadoq lilmike @PrinceKyle Virgo Mysterytrain &data
|
||||
:nuclear.netwirc.tk 366 storm_bot #a11y :End of /NAMES list.
|
||||
Trying 71.69.198.142...
|
||||
Connected to irc.netwirc.tk.
|
||||
Escape character is '^]'.
|
||||
:ender.netwirc.tk NOTICE * :*** Looking up your hostname...
|
||||
:ender.netwirc.tk NOTICE * :*** Couldn't resolve your hostname; using your IP address instead
|
||||
:ender.netwirc.tk 001 storm_bot :Welcome to the NetwIRC IRC Network storm_bot!storm_bot@137.118.216.238
|
||||
:ender.netwirc.tk 002 storm_bot :Your host is ender.netwirc.tk, running version UnrealIRCd-4.0.3.1
|
||||
:ender.netwirc.tk 003 storm_bot :This server was created Thu Jun 2 2016 at 01:57:02 UTC
|
||||
:ender.netwirc.tk 004 storm_bot ender.netwirc.tk UnrealIRCd-4.0.3.1 iowrsxzdHtIRqpWGTSB lvhopsmntikraqbeIzMQNRTOVKDdGLPZSCcf
|
||||
:ender.netwirc.tk 005 storm_bot UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=25 CHANLIMIT=#:25 MAXLIST=b:60,e:60,I:60 MAXNICKLEN=30 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 AWAYLEN=307 :are supported by this server
|
||||
:ender.netwirc.tk 005 storm_bot MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kLf,l,psmntirzMQNRTOVKDdGPZSCc NETWORK=NetwIRC CASEMAPPING=ascii EXTBAN=~,SOcaRrnqj ELIST=MNUCT :are supported by this server
|
||||
:ender.netwirc.tk 005 storm_bot STATUSMSG=~&@%+ EXCEPTS INVEX CMDS=USERIP,STARTTLS,KNOCK,DCCALLOW,MAP :are supported by this server
|
||||
:ender.netwirc.tk 396 storm_bot 6A229115.A61C7C6C.37E689BC.IP :is now your displayed host
|
||||
:ender.netwirc.tk 251 storm_bot :There are 1 users and 33 invisible on 4 servers
|
||||
:ender.netwirc.tk 252 storm_bot 9 :operator(s) online
|
||||
:ender.netwirc.tk 254 storm_bot 9 :channels formed
|
||||
:ender.netwirc.tk 255 storm_bot :I have 7 clients and 1 servers
|
||||
:ender.netwirc.tk 265 storm_bot 7 13 :Current local users 7, max 13
|
||||
:ender.netwirc.tk 266 storm_bot 34 40 :Current global users 34, max 40
|
||||
:ender.netwirc.tk 422 storm_bot :MOTD File is missing
|
||||
:storm_bot MODE storm_bot :+iwx
|
||||
:ender.netwirc.tk 332 storm_bot #a11y :Welcome to #a11y, because we are more than this!
|
||||
:ender.netwirc.tk 333 storm_bot #a11y Jeremiah 1472770664
|
||||
:ender.netwirc.tk 353 storm_bot = #a11y :storm_bot xogium xogium_ mariachiac @chrys @storm_dragon Tsadoq lilmike @PrinceKyle Virgo Mysterytrain &data
|
||||
:ender.netwirc.tk 366 storm_bot #a11y :End of /NAMES list.
|
||||
Trying 163.172.137.39...
|
||||
Connected to irc.netwirc.tk.
|
||||
Escape character is '^]'.
|
||||
:nuclear.netwirc.tk NOTICE * :*** Looking up your hostname...
|
||||
:nuclear.netwirc.tk NOTICE * :*** Couldn't resolve your hostname; using your IP address instead
|
||||
:nuclear.netwirc.tk 001 storm_bot :Welcome to the NetwIRC IRC Network storm_bot!storm_bot@137.118.216.238
|
||||
:nuclear.netwirc.tk 002 storm_bot :Your host is nuclear.netwirc.tk, running version UnrealIRCd-4.0.5
|
||||
:nuclear.netwirc.tk 003 storm_bot :This server was created Sat Jul 30 2016 at 18:16:53 UTC
|
||||
:nuclear.netwirc.tk 004 storm_bot nuclear.netwirc.tk UnrealIRCd-4.0.5 iowrsxzdHtIRqpWGTSB lvhopsmntikraqbeIzMQNRTOVKDdGLPZSCcf
|
||||
:nuclear.netwirc.tk 005 storm_bot CMDS=USERIP,STARTTLS,KNOCK,DCCALLOW,MAP UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=25 CHANLIMIT=#:25 MAXLIST=b:60,e:60,I:60 MAXNICKLEN=30 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 :are supported by this server
|
||||
:nuclear.netwirc.tk 005 storm_bot AWAYLEN=307 MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kLf,l,psmntirzMQNRTOVKDdGPZSCc NETWORK=NetwIRC CASEMAPPING=ascii EXTBAN=~,SOcaRrnqj :are supported by this server
|
||||
:nuclear.netwirc.tk 005 storm_bot ELIST=MNUCT STATUSMSG=~&@%+ EXCEPTS INVEX :are supported by this server
|
||||
:nuclear.netwirc.tk 396 storm_bot 6A229115.A61C7C6C.37E689BC.IP :is now your displayed host
|
||||
:nuclear.netwirc.tk 251 storm_bot :There are 1 users and 32 invisible on 4 servers
|
||||
:nuclear.netwirc.tk 252 storm_bot 9 :operator(s) online
|
||||
:nuclear.netwirc.tk 254 storm_bot 9 :channels formed
|
||||
:nuclear.netwirc.tk 255 storm_bot :I have 16 clients and 3 servers
|
||||
:nuclear.netwirc.tk 265 storm_bot 16 21 :Current local users 16, max 21
|
||||
:nuclear.netwirc.tk 266 storm_bot 33 40 :Current global users 33, max 40
|
||||
:nuclear.netwirc.tk 422 storm_bot :MOTD File is missing
|
||||
:storm_bot MODE storm_bot :+iwx
|
||||
:nuclear.netwirc.tk 332 storm_bot #a11y :Welcome to #a11y, because we are more than this!
|
||||
:nuclear.netwirc.tk 333 storm_bot #a11y Jeremiah 1472770664
|
||||
:nuclear.netwirc.tk 353 storm_bot = #a11y :storm_bot xogium xogium_ mariachiac @chrys @storm_dragon Tsadoq lilmike @PrinceKyle Virgo Mysterytrain &data
|
||||
:nuclear.netwirc.tk 366 storm_bot #a11y :End of /NAMES list.
|
||||
:nuclear.netwirc.tk 482 storm_bot #a11y :You're not channel operator
|
||||
:data!commander@netwirc.tk MODE #a11y +qo Jeremiah Jeremiah
|
||||
:nuclear.netwirc.tk 482 storm_bot #a11y :You're not channel operator
|
||||
Trying 71.69.198.142...
|
||||
Connected to irc.netwirc.tk.
|
||||
Escape character is '^]'.
|
||||
:ender.netwirc.tk NOTICE * :*** Looking up your hostname...
|
||||
:ender.netwirc.tk NOTICE * :*** Couldn't resolve your hostname; using your IP address instead
|
||||
:ender.netwirc.tk 001 storm_bot :Welcome to the NetwIRC IRC Network storm_bot!storm_bot@137.118.216.238
|
||||
:ender.netwirc.tk 002 storm_bot :Your host is ender.netwirc.tk, running version UnrealIRCd-4.0.3.1
|
||||
:ender.netwirc.tk 003 storm_bot :This server was created Thu Jun 2 2016 at 01:57:02 UTC
|
||||
:ender.netwirc.tk 004 storm_bot ender.netwirc.tk UnrealIRCd-4.0.3.1 iowrsxzdHtIRqpWGTSB lvhopsmntikraqbeIzMQNRTOVKDdGLPZSCcf
|
||||
:ender.netwirc.tk 005 storm_bot UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=25 CHANLIMIT=#:25 MAXLIST=b:60,e:60,I:60 MAXNICKLEN=30 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 AWAYLEN=307 :are supported by this server
|
||||
:ender.netwirc.tk 005 storm_bot MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kLf,l,psmntirzMQNRTOVKDdGPZSCc NETWORK=NetwIRC CASEMAPPING=ascii EXTBAN=~,SOcaRrnqj ELIST=MNUCT :are supported by this server
|
||||
:ender.netwirc.tk 005 storm_bot STATUSMSG=~&@%+ EXCEPTS INVEX CMDS=USERIP,STARTTLS,KNOCK,DCCALLOW,MAP :are supported by this server
|
||||
:ender.netwirc.tk 396 storm_bot 6A229115.A61C7C6C.37E689BC.IP :is now your displayed host
|
||||
:ender.netwirc.tk 251 storm_bot :There are 1 users and 34 invisible on 4 servers
|
||||
:ender.netwirc.tk 252 storm_bot 10 :operator(s) online
|
||||
:ender.netwirc.tk 254 storm_bot 9 :channels formed
|
||||
:ender.netwirc.tk 255 storm_bot :I have 8 clients and 1 servers
|
||||
:ender.netwirc.tk 265 storm_bot 8 13 :Current local users 8, max 13
|
||||
:ender.netwirc.tk 266 storm_bot 35 40 :Current global users 35, max 40
|
||||
:ender.netwirc.tk 422 storm_bot :MOTD File is missing
|
||||
:storm_bot MODE storm_bot :+iwx
|
||||
:ender.netwirc.tk 332 storm_bot #a11y :Welcome to #a11y, because we are more than this!
|
||||
:ender.netwirc.tk 333 storm_bot #a11y Jeremiah 1472770664
|
||||
:ender.netwirc.tk 353 storm_bot = #a11y :storm_bot ~Jeremiah Annalyn xogium xogium_ mariachiac @chrys @storm_dragon Tsadoq lilmike @PrinceKyle Virgo Mysterytrain &data
|
||||
:ender.netwirc.tk 366 storm_bot #a11y :End of /NAMES list.
|
||||
Trying 163.172.137.39...
|
||||
Connected to irc.netwirc.tk.
|
||||
Escape character is '^]'.
|
||||
:nuclear.netwirc.tk NOTICE * :*** Looking up your hostname...
|
||||
:nuclear.netwirc.tk NOTICE * :*** Couldn't resolve your hostname; using your IP address instead
|
||||
:nuclear.netwirc.tk 001 storm_bot :Welcome to the NetwIRC IRC Network storm_bot!storm_bot@137.118.216.238
|
||||
:nuclear.netwirc.tk 002 storm_bot :Your host is nuclear.netwirc.tk, running version UnrealIRCd-4.0.5
|
||||
:nuclear.netwirc.tk 003 storm_bot :This server was created Sat Jul 30 2016 at 18:16:53 UTC
|
||||
:nuclear.netwirc.tk 004 storm_bot nuclear.netwirc.tk UnrealIRCd-4.0.5 iowrsxzdHtIRqpWGTSB lvhopsmntikraqbeIzMQNRTOVKDdGLPZSCcf
|
||||
:nuclear.netwirc.tk 005 storm_bot CMDS=USERIP,STARTTLS,KNOCK,DCCALLOW,MAP UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=25 CHANLIMIT=#:25 MAXLIST=b:60,e:60,I:60 MAXNICKLEN=30 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 :are supported by this server
|
||||
:nuclear.netwirc.tk 005 storm_bot AWAYLEN=307 MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kLf,l,psmntirzMQNRTOVKDdGPZSCc NETWORK=NetwIRC CASEMAPPING=ascii EXTBAN=~,SOcaRrnqj :are supported by this server
|
||||
:nuclear.netwirc.tk 005 storm_bot ELIST=MNUCT STATUSMSG=~&@%+ EXCEPTS INVEX :are supported by this server
|
||||
:nuclear.netwirc.tk 396 storm_bot 6A229115.A61C7C6C.37E689BC.IP :is now your displayed host
|
||||
:nuclear.netwirc.tk 251 storm_bot :There are 1 users and 34 invisible on 4 servers
|
||||
:nuclear.netwirc.tk 252 storm_bot 10 :operator(s) online
|
||||
:nuclear.netwirc.tk 254 storm_bot 9 :channels formed
|
||||
:nuclear.netwirc.tk 255 storm_bot :I have 17 clients and 3 servers
|
||||
:nuclear.netwirc.tk 265 storm_bot 17 21 :Current local users 17, max 21
|
||||
:nuclear.netwirc.tk 266 storm_bot 35 40 :Current global users 35, max 40
|
||||
:nuclear.netwirc.tk 422 storm_bot :MOTD File is missing
|
||||
:storm_bot MODE storm_bot :+iwx
|
||||
:nuclear.netwirc.tk 332 storm_bot #a11y :Welcome to #a11y, because we are more than this!
|
||||
:nuclear.netwirc.tk 333 storm_bot #a11y Jeremiah 1472770664
|
||||
:nuclear.netwirc.tk 353 storm_bot = #a11y :storm_bot ~Jeremiah Annalyn xogium xogium_ mariachiac @chrys @storm_dragon Tsadoq lilmike @PrinceKyle Virgo Mysterytrain &data
|
||||
:nuclear.netwirc.tk 366 storm_bot #a11y :End of /NAMES list.
|
||||
Trying 71.69.198.142...
|
||||
Connected to irc.netwirc.tk.
|
||||
Escape character is '^]'.
|
||||
:ender.netwirc.tk NOTICE * :*** Looking up your hostname...
|
||||
:ender.netwirc.tk NOTICE * :*** Couldn't resolve your hostname; using your IP address instead
|
||||
:ender.netwirc.tk 001 storm_bot :Welcome to the NetwIRC IRC Network storm_bot!storm_bot@137.118.216.238
|
||||
:ender.netwirc.tk 002 storm_bot :Your host is ender.netwirc.tk, running version UnrealIRCd-4.0.3.1
|
||||
:ender.netwirc.tk 003 storm_bot :This server was created Thu Jun 2 2016 at 01:57:02 UTC
|
||||
:ender.netwirc.tk 004 storm_bot ender.netwirc.tk UnrealIRCd-4.0.3.1 iowrsxzdHtIRqpWGTSB lvhopsmntikraqbeIzMQNRTOVKDdGLPZSCcf
|
||||
:ender.netwirc.tk 005 storm_bot UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=25 CHANLIMIT=#:25 MAXLIST=b:60,e:60,I:60 MAXNICKLEN=30 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 AWAYLEN=307 :are supported by this server
|
||||
:ender.netwirc.tk 005 storm_bot MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kLf,l,psmntirzMQNRTOVKDdGPZSCc NETWORK=NetwIRC CASEMAPPING=ascii EXTBAN=~,SOcaRrnqj ELIST=MNUCT :are supported by this server
|
||||
:ender.netwirc.tk 005 storm_bot STATUSMSG=~&@%+ EXCEPTS INVEX CMDS=USERIP,STARTTLS,KNOCK,DCCALLOW,MAP :are supported by this server
|
||||
:ender.netwirc.tk 396 storm_bot 6A229115.A61C7C6C.37E689BC.IP :is now your displayed host
|
||||
:ender.netwirc.tk 251 storm_bot :There are 1 users and 34 invisible on 4 servers
|
||||
:ender.netwirc.tk 252 storm_bot 10 :operator(s) online
|
||||
:ender.netwirc.tk 254 storm_bot 9 :channels formed
|
||||
:ender.netwirc.tk 255 storm_bot :I have 8 clients and 1 servers
|
||||
:ender.netwirc.tk 265 storm_bot 8 13 :Current local users 8, max 13
|
||||
:ender.netwirc.tk 266 storm_bot 35 40 :Current global users 35, max 40
|
||||
:ender.netwirc.tk 422 storm_bot :MOTD File is missing
|
||||
:storm_bot MODE storm_bot :+iwx
|
||||
:ender.netwirc.tk 332 storm_bot #a11y :Welcome to #a11y, because we are more than this!
|
||||
:ender.netwirc.tk 333 storm_bot #a11y Jeremiah 1472770664
|
||||
:ender.netwirc.tk 353 storm_bot = #a11y :storm_bot ~Jeremiah Annalyn xogium xogium_ mariachiac @chrys @storm_dragon Tsadoq lilmike @PrinceKyle Virgo Mysterytrain &data
|
||||
:ender.netwirc.tk 366 storm_bot #a11y :End of /NAMES list.
|
@ -10,9 +10,10 @@ shift
|
||||
# the variable $who contains the nick that caused the trigger.
|
||||
declare -A keywords
|
||||
keywords[linux]="msg \"$chan\" \"awesome!\""
|
||||
keywords[chicken]="msg \"$chan\" \"$who, I'm gonna grab me $(shuf -n1 -e "a case of beer" "a weed eater" "a 5 gallon jug of vaseline") and a $(shuf -n1 -e dead frozen live young) chicken, and have fun ALL NIGHT LONG!!!\""
|
||||
keywords[chicken]="msg \"$chan\" \"$who, I'm gonna grab me $(shuf -n1 -e "a case of beer" "a weed eater" "a 5 gallon jug of vaseline") and a $(shuf -n1 -e dead frozen live young) chicken, and $(shuf -n1 -e "have fun" "make chicks" "lay it like an egg") ALL NIGHT LONG!!!\""
|
||||
keywords[dragonforce]="msg \"$chan\" \"$who: I love DragonForce!!!\""
|
||||
|
||||
wordList="$(echo "$@" | tr '[:space:]' $'\n' | sort -u)"
|
||||
wordList="$(echo "${@,,}" | tr '[:space:]' $'\n' | sort -u)"
|
||||
for w in ${wordList//[[:punct:]]/} ; do
|
||||
if [[ -n "${keywords[${w,,}]}" ]]; then
|
||||
eval ${keywords[${w,,}]}
|
||||
|
Loading…
Reference in New Issue
Block a user