Anyways, I used to have this timer set on the PHP Bot to check the user list every 3 minutes, and for each user it found that was not already in its namelist array (or was in it but without a status of 3), it added that user as the array key and their status code (0, 1, 2, or 3, NickServ's various Identification levels).
For example:
(PHP example)
Code: Select all
$userlist = array(
'Tom' => 3, // Identified
'Dick' => 0, // Nick Not Registered
'Harry => 1 // Nick Registered, but not Identified as owner
)
I have been reading, and my understanding is that Tcl arrays are ONLY associative arrays--they are not indexes with numbers, like a lot of the languages I'm familiar with. That's cool, though, because what I've been using is an associative array.
The problem arises when I realize I don't know how I can make eggdrop listen for NOTICE responses from NickServ when it sends queries about the status. Or maybe I'm going about this entirely the wrong way, I'm not sure. XP
BASICALLY, I want to make sure that the users executing certain commands on the bot are IDENTIFIED with NickServ. I'd like to take that info and send it via POST to a PHP script, which will parse it and send it in turn to a MySQL server. (Later on down the line, I'd like to see if I can use Tcl to directly interface with MySQL, but there's a lot of PHP I'd have to re-write into Tcl in order to get my script running right, so for now I'll stick with Tcl -> POST for PHP -> MySQL.)
I'm already aware of how to send the POST data, have made a script, tested it, and everything works out A-OK.
If I could be allowed to double-post, I'll post a snippet of the PHP code in the next post, to give you a general idea of what I was doing. I know that my way was probably not the most elegant of solutions, but it worked. XP