TheRaven/IRCMessage.csharp

29 lines
707 B
Plaintext
Raw Permalink Normal View History

Converting to Git. Bazaar log was: ------------------------------------------------------------ revno: 6 committer: dev <dev@aninix.net> branch nick: TheRaven timestamp: Thu 2016-06-02 23:21:56 -0500 message: Updating to include dedicated raven user. Adding RavenExecute.Command() static function to handle OS integration. Updating RavenCommand to use Djinni package for mailing. ------------------------------------------------------------ revno: 5 committer: dev <dev@aninix.net> branch nick: TheRaven timestamp: Wed 2016-04-20 16:59:51 -0500 message: Updated Makefile to include OS dependencies Updated ircservermessage to fix dropped sections of searches from things like "r.image :blar:" Added new tinyURL feature -- WARNING: this requires that the OS has a script api-keys in the path that will return an API key for the TinyURL service ------------------------------------------------------------ revno: 4 committer: dev <dev@aninix.net> branch nick: TheRaven timestamp: Mon 2016-03-28 14:40:00 -0500 message: MailerCount is now added to limit the number of pages sent to admins. ------------------------------------------------------------ revno: 3 committer: ircd <ircd@aninix.net> branch nick: TheRaven timestamp: Fri 2016-01-15 14:36:54 -0600 message: Removing an unneeded file -- requests are tracked in keep.google.com now Makefile had a run rule added to run the bot in the foreground with the verbose flag. This prevents the user from accidentally compiling and installing TheRaven with higher verbosity and filling system logs. Ravencommand was modified to check for user modes r (registerd on UnrealIRCd) or G (registered on InspIRCd) before running whitelist commands. connection.csharp had functions added to check for users being authenticated (IRC response code 330 in a WHOIS request) and do get modes ------------------------------------------------------------ revno: 2 committer: root <root@aninix.net> branch nick: TheRaven timestamp: Mon 2015-12-14 14:58:02 -0600 message: Updated commenting Removed requests file in favor of keep.google.com Updated ircservermessage.csharp et. al. for better verbosity options Edited connection.csharp to not need a Raven instance and instead take host and port Updated private globals to standard Moved Verbosity enum to not be inside ReportMessage class ------------------------------------------------------------ revno: 1 committer: ircd <ircd@aninix.net> branch nick: TheRaven timestamp: Thu 2015-12-10 21:58:41 -0600 message: Adding all my files.
2016-08-04 11:08:14 -05:00
using System;
namespace AniNIX.TheRaven {
public abstract class IRCMessage {
protected string incomingIRCString;
protected string outgoingIRCString;
public string GetOutgoingIRCString() {
return outgoingIRCString;
}
public string GetIncomingIRCString() {
return incomingIRCString;
}
public override string ToString() {
if (outgoingIRCString == null || outgoingIRCString.Length < 1) {
return String.Format(">>> {0}",incomingIRCString);
} else if (incomingIRCString == null || incomingIRCString.Length < 1) {
return String.Format("<<< {0}",outgoingIRCString);
} else {
return string.Format(">>> {1}\n<<< {0}",outgoingIRCString,incomingIRCString);
}
}
}
}