Code: Select all
PHP
<?php
$msg_bt = "some text to be sent to eggdrop";
$fs = fsockopen("127.0.0.1", "1234", $errno, $errstr);
if($fs) {
fwrite($fs, $msg_bt);
fclose($fs);
}
?>
Code: Select all
TCL
proc Server {channel clientaddr clientport} {
gets $channel msg_bt
putserv "PRIVMSG #lennonjohto :$msg_bt"
putserv "ADDLINE :$msg_bt"
close $channel
socket -server Server 1234
}
socket -server Server 1234
Anyway, this works but everytime I try to rehash the bot it crashes
and the bot quits.. I got the script from somewhere and I really dont know how to use sockets.. all I know it works, but crashes when I rehash.. How to change the script/what's wrong with it?Tcl error in file botti.conf
couldn't open socket: address already in use
while executing
"socket -server Server 1234"