mIRC Script to PHP Command for IRC Bot - 25/07/11 01:19 PM
Hi guys.
I am not sure if this qualifies to be in this section, but - I've also posted this on Hawkee. If someone could help, that'd be awesome.
Below, if the script I am currently using for mIRC. I have the PHP bot from http://wildphp.com. I checked the following website out trying to figure the stuff out needed for IRC, but - i couldn't convert what they had on the website to IRC talk.. www.tizag.com/phpT/index.php
So.. Basically.....
I want certain people able to use the !updatecb command (Including Me.) - everyone to use the !cb command. (Including Me.)
The !updatecb command updates a text file on my computer while deleting any existing data that was in that file.
The !cb shows what is in the text file.
Im a noob at PHP and I Hope someone can help me!
Thanks,
ZG
I am not sure if this qualifies to be in this section, but - I've also posted this on Hawkee. If someone could help, that'd be awesome.
Below, if the script I am currently using for mIRC. I have the PHP bot from http://wildphp.com. I checked the following website out trying to figure the stuff out needed for IRC, but - i couldn't convert what they had on the website to IRC talk.. www.tizag.com/phpT/index.php
Code:
on 5:INPUT:#:{ if ($1 == !updatecb) { write -c orders.txt 2Current Battle: $2- .timermsg 1 1 msg $chan 2Battle Updated Successfully. Thank You, $nick msg $me Current Battle link updated by: $nick at $time(h:nnTT) EST. } on *:INPUT:#:{ if ($1 == !cb) { .timermsg 1 1 msg $chan $read(orders.txt,nt) }
So.. Basically.....
I want certain people able to use the !updatecb command (Including Me.) - everyone to use the !cb command. (Including Me.)
The !updatecb command updates a text file on my computer while deleting any existing data that was in that file.
The !cb shows what is in the text file.
Im a noob at PHP and I Hope someone can help me!
Thanks,
ZG
Quote:
Oh.
I already have the base of the bot. So, I just need it in a command format similar below:
Also, The functions is separate so, don't include them in the script - but, in a different code so I can add them.
Thanks
I already have the base of the bot. So, I just need it in a command format similar below:
Code:
case (strcasecmp($command, ':!command') == 0): if ($this->ex[2] == "#Channel1" || $this->ex[2] == "#Channel2" || $this->ex[2] == "#Channel3" || $this->ex[2] == "#Channel4"); { $message = ""; for($i=4; $i <= (count($this->ex)); $i++) { $message .= $this->ex[$i]." "; } $send = 'Current Battle - Link'; $this->send_data2('PRIVMSG '.$this->ex[2].' :', $send); } unset($this); unset($name); unset($send); break;
Also, The functions is separate so, don't include them in the script - but, in a different code so I can add them.
Thanks