im not too sure if this is the proper place for something like this but this site has helped me greatly in the past so i figured id give it a shot, quite frankly its my last hope
ok heres my problem, im running a CentOS linux game server, and its running a .sh script made to email admins of a problem people are having when someone issues the command !admin <message>, the script works and its all good.
Now, what im trying to do, is add onto that script so that it logs into an ICQ or AIM messenger account and IMs the <message> that was typed to a couple of my admins on ICQ or AIM. I've googled half the night and was unable to come up with anything useful...not to mention im a noob when it comes to .sh scripts. My biggest problem is that the script has to be contained in the one existing .sh file, i dont have the access to install anything like NET::AIM, NET::ICQ or gaim. The author of the script stated quite a few times on his website that he was able to add a few lines after the "mail" command to send messages via ICQ/AIM messengers, but never shared his additions to the origional script...i posted my problem there on his site about 3 months ago, but no one has seen or heard from the guy since december so im fairly certain my question will remain unanswered there.
I know its alot to ask of someone, but if ANYONE can come up with this it would be HUGELY appreciated. Heres the origional script called notify.sh:
Code:
#!/bin/sh
LOCKFILE=notify.lock
LOCKDIR=var
# LOCKDIR=/usr/local/games/enemy_territory/etadmin_mod/tools/locks
# Lock this script at least 30 minutes
LOCK=`find $LOCKDIR/ -cmin -30 -name $LOCKFILE`
if ( test -z "$LOCK" ) then
# OK
touch $LOCKDIR/$LOCKFILE
else
# LOCKED
echo "Admin already notified in the last 30 minutes."
exit
fi
echo "Message from $2:" >$LOCKDIR/$LOCKFILE
echo "$3" >>$LOCKDIR/$LOCKFILE
mail email@removed.com -s "FS Admin Notify" <$LOCKDIR/$LOCKFILE
echo "Thank you $1^0. ^7An Admin has been notified..."
As you can see its quite simple, when someone issues !admin <message> it dumps the message into a file called notify.lock, then emails the set email address with the contents of notify.lock with the subject "FS Admin Notify", then locks the script for 30 minutes.
If anyone can figure out something that i could throw in after
"mail
email@removed.com -s "FS Admin Notify" <$LOCKDIR/$LOCKFILE"
that logs into AIM or ICQ (doesnt matter which) sends the message to 3 or 4 names if then disconnects, then you could be an absolute lifesaver and i would proclaim you as a genious. Thanks in advance to anyone whos knowledgable enough to take this on.