first updates.
This commit is contained in:
parent
a1e3cb078f
commit
ae2a737d2c
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
log.txt
|
||||||
|
.bot.cfg
|
@ -1,5 +1,11 @@
|
|||||||
server="irc.freenode.net"
|
server="irc.netwirc.tk"
|
||||||
channel="linux"
|
port=6667
|
||||||
nick="bashbot"
|
#enter channels here in quotes before the )
|
||||||
user="username hostname servername :realname"
|
channel=(
|
||||||
|
"a11y"
|
||||||
|
)
|
||||||
|
nick="storm_bot"
|
||||||
|
# format=username hostname servername :realname
|
||||||
|
user="$nick ${server%.} $server :$nick"
|
||||||
|
# Path to log file
|
||||||
log="log.txt"
|
log="log.txt"
|
||||||
|
8
bot.sh
8
bot.sh
@ -1,13 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. bot.properties
|
[ -f bot.properties ] && source bot.properties
|
||||||
input=".bot.cfg"
|
input=".bot.cfg"
|
||||||
echo "Starting session: $(date "+[%y:%m:%d %T]")">$log
|
echo "Starting session: $(date "+[%y:%m:%d %T]")">$log
|
||||||
echo "NICK $nick" > $input
|
echo "NICK $nick" > $input
|
||||||
echo "USER $user" >> $input
|
echo "USER $user" >> $input
|
||||||
echo "JOIN #$channel" >> $input
|
for c in ${channel[@]} ; do
|
||||||
|
echo "JOIN #$c" | tee -a $input
|
||||||
|
done
|
||||||
|
|
||||||
tail -f $input | telnet $server 6667 | while read res
|
tail -f $input | telnet $server $port | while read res
|
||||||
do
|
do
|
||||||
# log the session
|
# log the session
|
||||||
echo "$(date "+[%y:%m:%d %T]")$res" >> $log
|
echo "$(date "+[%y:%m:%d %T]")$res" >> $log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user