Lately, I've been working on my own bot, for a channel that I am in, and I have been wanting it to do this:
<nick> ? trink
<trink-bot> trink: blah blah blah
Now, via /writeini I have created a !set command that, if "!set trink blah blah blah" were used it would write the ini file as
[trink]
key=blah blah blah
I have the ? script as follows, and it doesn't seem to work, I've tried many different ways, and this is what i've managed to get as a result, which still does not work.
on *:TEXT:\?*:#:{
if (%tbe == 0) { }
else { if (%tbt == 0) { }
else {
/msg $chan $2 - $readini($keys.ini,$2,key)
/msg $chan %key
} } }
Don't mind the first three lines after on *:TEXT:\?*:#:{ and the ending two } }, thats code that I added in for something different, and that code seems to work.
I'm not too familiar with how to read from an ini, I orignally thought readini was an actual /command, but I was wrong, a little help would be appreciated. I'm just an irc scripting beginner. Thanks, trink.