We have an Online maffia game and we want if someone dies the bot says on IRC: user bla has just got killed!
We already got something but its not good but its only the idea
hope you guys can help me
this is what we have: (This is maybe incorrect)
Code: Select all
set dbhost "bla"
set dbuser "bla"
set dbpass "bla"
set dbname "bla"
set db_handle [mysqlconnect -host $dbhost -user $dbuser -password $dbpass]
mysqluse $db_handle $dbname
set query [SELECT * FROM `[users]` WHERE `callonirc`='1' AND `deader`='1']
foreach result $query { #$result = mysql_fetch_object($query) ; in PHP
putquick "PRIVMSG #capone : $result->login has just died!"
}
If someone dies the row callonirc and deader will be updated to 1 and then the bot needs to say User: blaa has just died!
Thanks in Advance.