2009-01-26 20:12:53 +00:00
|
|
|
// $Id: user.c,v 1.15 2008/12/09 19:27:32 lynx Exp $ // vim:syntax=lpc
|
2009-01-26 19:21:29 +00:00
|
|
|
//
|
|
|
|
// handler for PSYC clients
|
|
|
|
|
2009-01-26 20:12:53 +00:00
|
|
|
#include "common.h"
|
2009-01-26 19:21:29 +00:00
|
|
|
#include <net.h>
|
|
|
|
#include <user.h>
|
|
|
|
|
|
|
|
qHasCurrentPlace() { return 0; }
|
|
|
|
|
|
|
|
logon() {
|
|
|
|
#ifdef NO_EXTERNAL_LOGINS
|
2009-03-20 10:47:20 +00:00
|
|
|
return destruct(ME);
|
2009-01-26 19:21:29 +00:00
|
|
|
#endif
|
|
|
|
// psyc users dont have their own socket, so the driver
|
|
|
|
// does not call disconnected() for them - this enables the
|
|
|
|
// psyc socket to do that
|
2009-01-26 20:12:53 +00:00
|
|
|
if (this_interactive()) this_interactive()->do_notify_on_disconnect(ME);
|
|
|
|
// connection that is creating us, died while we got here.
|
|
|
|
// rare, but does indeed happen sometimes.
|
|
|
|
else return destruct(ME);
|
|
|
|
|
2009-01-26 19:21:29 +00:00
|
|
|
// no lang support here either
|
|
|
|
vSet("scheme", "psyc");
|
|
|
|
return ::logon();
|
|
|
|
}
|
|
|
|
|
|
|
|
// errors only, it says
|
|
|
|
pr(mc, fmt, a,b,c,d,e,f,g,h) {
|
|
|
|
#if 1 //def PRO_PATH
|
|
|
|
if (abbrev("_message",mc)) return;
|
|
|
|
if (v("location"))
|
|
|
|
sendmsg(v("location"), mc+"_print", sprintf(fmt, a,b,c,d,e,f,g,h) );
|
|
|
|
#else
|
|
|
|
// checkVar() still calls pr() .... grmlblmblm TODO
|
|
|
|
raise_error("pr() called\n");
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
wAction(mc, data, vars, source, variant, nick) { return 0; }
|