pike.git / lib / modules / Protocols.pmod / IRC.pmod / Raw.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/IRC.pmod/Raw.pike:16:   void create(string|object server,int port,    function(string,string ...:void) _command_callback,    void|function(string,string...:void) _notify_callback,    void|function(:void) _close_callback)   {    if (objectp(server))    con = server;    else {    array aserver=gethostbyname(server);    if (!aserver || !sizeof(aserver[1])) -  Error.connection("Failed to lookup host %O",server); +  Error.connection(sprintf("Failed to lookup host %O", server), 0); //No errno available    server=aserver[1][random(sizeof(aserver[1]))];       con=Stdio.File();    if (!con->connect(server,port))    Error.connection("Failed to connect",con->errno());    }       con->set_nonblocking(con_read,0,con_close);       command_callback=_command_callback;
pike.git/lib/modules/Protocols.pmod/IRC.pmod/Raw.pike:111:    werror("<- (write error; con lost)\n");   #endif    return;    }    int j=con->write(s);    if (j!=sizeof(s))    {    if (j==-1)    {   #ifdef IRC_DEBUG -  werror("<- (write error; %O)\n",strerror(con->errno())); +  werror("<- (write error; %s)\n",strerror(con->errno()));   #endif    return; // connection broken?    }   #ifdef IRC_DEBUG    werror("<- %O [%d] (buffer full)\n",s[0..j-1],j);   #endif    write_buf=({s[j..]});    con->set_nonblocking(con_read,con_write_callback,con_close);    }   #ifdef IRC_DEBUG