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=(
|
channel=(
|
||||||
"a11y"
|
"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)
|
# Greet people who enter the channel? (true/false)
|
||||||
# Configure greetings in triggers/greet/greet.sh
|
# Configure greetings in triggers/greet/greet.sh
|
||||||
greet=true
|
greet=true
|
||||||
|
90
bot.sh
90
bot.sh
@ -6,102 +6,106 @@ input=".botinput"
|
|||||||
|
|
||||||
close_bot()
|
close_bot()
|
||||||
{
|
{
|
||||||
echo -en ":QUIT :$quitMessage\r\n" >> "$input"
|
echo -en "QUIT :$quitMessage\r\n" >> "$input"
|
||||||
rm "$input"
|
rm "$input"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
trap close_bot EXIT $?
|
trap close_bot EXIT $?
|
||||||
|
|
||||||
echo "Starting session: $(date "+[%y:%m:%d %T]")" | tee $log
|
echo "Session started $(date "+%I:%M%p%n %A, %B %d, %Y")" | tee "$log"
|
||||||
echo "NICK $nick" > $input
|
echo "NICK $nick" | tee "$input"
|
||||||
echo "USER $user" >> $input
|
echo "USER $user" | tee -a "$input"
|
||||||
for c in ${channel[@]} ; do
|
for c in ${channel[@]} ; do
|
||||||
echo "JOIN #$c" | tee -a $input
|
echo "JOIN #$c" | tee -a "$input"
|
||||||
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
tail -f $input | telnet $server $port | while read res
|
tail -f "$input" | telnet "$server" "$port" | while read result
|
||||||
do
|
do
|
||||||
# log the session
|
# 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
|
# do things when you see output
|
||||||
case "$res" in
|
case "$result" in
|
||||||
# respond to ping requests from the server
|
# respond to ping requests from the server
|
||||||
PING*)
|
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
|
# for pings on nick/user
|
||||||
*"You have not"*)
|
*"You have not"*)
|
||||||
echo "JOIN #$channel" >> $input
|
echo "JOIN #$channel" | tee -a "$input"
|
||||||
;;
|
;;
|
||||||
# run when someone joins
|
# run when someone joins
|
||||||
*"JOIN :#"*)
|
*"JOIN :#"*)
|
||||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
who="${result%%!*}"
|
||||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
who="${who:1}"
|
||||||
chan="#$chan"
|
from="${result#*#}"
|
||||||
|
from="#$from"
|
||||||
if [ "$who" = "$nick" ]; then
|
if [ "$who" = "$nick" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "MODE #$channel +o $who" >> $input
|
echo "MODE #$channel +o $who" | tee -a "$input"
|
||||||
if [ "${greet^^}" = "TRUE" ]; then
|
if [ "${greet^^}" = "TRUE" ]; then
|
||||||
./triggers/greet/greet.sh $who $chan
|
./triggers/greet/greet.sh "$who" "$from"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
# run when someone leaves
|
# run when someone leaves
|
||||||
*"PART #"*)
|
*"PART #"*)
|
||||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
who="${result%%!*}"
|
||||||
chan="$(echo "$res" | cut -d '#' -f2)"
|
who="${who:1}"
|
||||||
chan="#$chan"
|
from="${result#*#}"
|
||||||
|
from="#$from"
|
||||||
if [ "$who" = "$nick" ]; then
|
if [ "$who" = "$nick" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "MODE #$channel +o $who" >> $input
|
|
||||||
if [ "${leave^^}" = "TRUE" ]; then
|
if [ "${leave^^}" = "TRUE" ]; then
|
||||||
./triggers/bye/bye.sh $who $chan
|
./triggers/bye/bye.sh "$who" "$from"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
# run when a message is seen
|
# run when a message is seen
|
||||||
*PRIVMSG*)
|
*PRIVMSG*)
|
||||||
echo "$res"
|
echo "$result" | tee -a "$log"
|
||||||
who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/")
|
who="${result%%!*}"
|
||||||
from=$(echo "$res" | perl -pe "s/.*PRIVMSG (.*[#]?([a-zA-Z]|\-)*) :.*/\1/")
|
who="${who:1}"
|
||||||
# This looks to be the spot where triggers should be called
|
from="${result#*#}"
|
||||||
|
from="#${from%% *}"
|
||||||
|
# Trigger stuff happens here.
|
||||||
# Call link trigger if msg contains a link:
|
# Call link trigger if msg contains a link:
|
||||||
if [[ "$res" =~ .*http://|https://|www\..* ]]; then
|
if [[ "$result" =~ .*http://|https://|www\..* ]]; then
|
||||||
./triggers/link/link.sh "$who" "$from" "$res"
|
./triggers/link/link.sh "$who" "$from" "$result"
|
||||||
# Although this calls modules, it triggers on text other than the bot's nick
|
# Although this calls modules, it triggers on text other than the bot's nick
|
||||||
elif [[ "$res" =~ ^.*PRIVMSG.*:[[:punct:]].* ]]; then
|
elif [[ "$result" =~ ^.*PRIVMSG.*:[[:punct:]].* ]]; then
|
||||||
com="${res#*:[[:punct:]]}"
|
command="${result#*:[[:punct:]]}"
|
||||||
com="${com//# /}"
|
command="${command//# /}"
|
||||||
will="${com#* }"
|
will="${command#* }"
|
||||||
com="${com%% *}"
|
command="${command%% *}"
|
||||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
if [ -z "$(ls modules/ | grep -i -- "$command")" ] || [ -z "$command" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
./modules/${com% *}/${com% *}.sh "$who" "$from" "$will"
|
./modules/${command% *}/${command% *}.sh "$who" "$from" "$will"
|
||||||
else
|
else
|
||||||
./triggers/keywords/keywords.sh "$who" "$from" "$res"
|
./triggers/keywords/keywords.sh "$who" "$from" "$result"
|
||||||
fi
|
fi
|
||||||
# "#" would mean it's a channel
|
# "#" would mean it's a channel
|
||||||
if [ "$(echo "$from" | grep '#')" ]; then
|
if [ "$(echo "$from" | grep '#')" ]; then
|
||||||
test "$(echo "$res" | grep ":$nick:")" || continue
|
test "$(echo "$result" | grep ":$nick:")" || continue
|
||||||
will=$(echo "$res" | perl -pe "s/.*:$nick:(.*)/\1/")
|
will="${result#*"${nick}":}"
|
||||||
else
|
else
|
||||||
will=$(echo "$res" | perl -pe "s/.*$nick :(.*)/\1/")
|
will="${result#*"${nick}" :}"
|
||||||
from=$who
|
from=$who
|
||||||
fi
|
fi
|
||||||
will=$(echo "$will" | perl -pe "s/^ +//")
|
will="${will//# /}"
|
||||||
com=$(echo "$will" | cut -d " " -f1)
|
command="${will%% *}"
|
||||||
|
will="${will#* }"
|
||||||
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
if [ -z "$(ls modules/ | grep -i -- "$com")" ] || [ -z "$com" ]; then
|
||||||
./modules/help/help.sh "$who" "$from"
|
./modules/help/help.sh "$who" "$from"
|
||||||
continue
|
continue
|
||||||
fi
|
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)"
|
echo "$result" | tee -a log
|
||||||
chan="#$chan"
|
|
||||||
echo "$res"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
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.
|
# the variable $who contains the nick that caused the trigger.
|
||||||
declare -A keywords
|
declare -A keywords
|
||||||
keywords[linux]="msg \"$chan\" \"awesome!\""
|
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
|
for w in ${wordList//[[:punct:]]/} ; do
|
||||||
if [[ -n "${keywords[${w,,}]}" ]]; then
|
if [[ -n "${keywords[${w,,}]}" ]]; then
|
||||||
eval ${keywords[${w,,}]}
|
eval ${keywords[${w,,}]}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user