mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-12-05 00:22:19 +00:00
+
This commit is contained in:
parent
291bd308c2
commit
e6cd27632e
@ -42,13 +42,6 @@ logon(failure) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect(remainder) {
|
|
||||||
// we typically just want to give it one more try
|
|
||||||
reconnect();
|
|
||||||
// the reconnect in circuit.c will do certain amount of retries only
|
|
||||||
return 0; // unexpected
|
|
||||||
}
|
|
||||||
|
|
||||||
msg(source, mc, data, mapping vars, showingLog, target) {
|
msg(source, mc, data, mapping vars, showingLog, target) {
|
||||||
string t, ni, mca;
|
string t, ni, mca;
|
||||||
|
|
||||||
@ -82,13 +75,21 @@ msg(source, mc, data, mapping vars, showingLog, target) {
|
|||||||
render(mca, data, vars, source);
|
render(mca, data, vars, source);
|
||||||
return 1;
|
return 1;
|
||||||
#else
|
#else
|
||||||
if (abbrev("_message_public", mc))
|
if (abbrev("_message_public", mc)) {
|
||||||
return emit(data + "\n");
|
// FIXME: should we handle the disconnect instead?
|
||||||
|
if (data == "quit") return 1;
|
||||||
|
return emit(data + "\n");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
|
disconnected(remaining) {
|
||||||
|
// circuit code would destruct this object
|
||||||
|
return NET_PATH "connect"::disconnected(remaining);
|
||||||
|
}
|
||||||
|
|
||||||
render(string mc, string data, mapping vars, mixed source) {
|
render(string mc, string data, mapping vars, mixed source) {
|
||||||
string template, output;
|
string template, output;
|
||||||
mixed t;
|
mixed t;
|
||||||
@ -101,45 +102,4 @@ render(string mc, string data, mapping vars, mixed source) {
|
|||||||
emit(output);
|
emit(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd(a, args, b, source, vars) {
|
|
||||||
string t;
|
|
||||||
|
|
||||||
// extra room commands for operators of the gateway
|
|
||||||
if (b > 0) switch(a) {
|
|
||||||
case "disc":
|
|
||||||
return disc();
|
|
||||||
}
|
|
||||||
return ::cmd(a, args, b, source, vars);
|
|
||||||
}
|
|
||||||
|
|
||||||
showStatus(verbosity, al, person, mc, data, vars) {
|
|
||||||
if (names && namesfrom) sendmsg(person, "_status_place_members_IRC",
|
|
||||||
"irc://[_server_IRC]/[_nick_place_IRC] contains: [_members_IRC]",
|
|
||||||
([ "_members_IRC": names,
|
|
||||||
//"_source_IRC": "irc://"+namesfrom+"/"+namesto
|
|
||||||
"_server_IRC": namesfrom,
|
|
||||||
"_nick_place_IRC": namesto ]));
|
|
||||||
return ::showStatus(verbosity, al, person, mc, data, vars);
|
|
||||||
}
|
|
||||||
|
|
||||||
reboot(reason, restart, pass) {
|
|
||||||
emit("QUIT :Service "+ (restart ? "restart" : "shutdown")
|
|
||||||
+": "+ reason +"\n");
|
|
||||||
return ::reboot(reason, restart, pass);
|
|
||||||
}
|
|
||||||
|
|
||||||
static disc() {
|
|
||||||
emit("QUIT :Service temporarily disabled\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
onEnter(source, mc, data, vars) {
|
|
||||||
if (interactive(ME)) tellChannel(source, mc, vars, data);
|
|
||||||
return ::onEnter(source, mc, data, vars);
|
|
||||||
}
|
|
||||||
leave(source, mc, data, vars) {
|
|
||||||
if (interactive(ME)) tellChannel(source, mc, vars, data);
|
|
||||||
return ::leave(source, mc, data, vars);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user