Implement PrivmsgPrefix
This commit is contained in:
parent
70b81fdd65
commit
c0e33b0b42
|
@ -0,0 +1,13 @@
|
|||
<Properties StartupItem="TestChatSharp/TestChatSharp.csproj">
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="ChatSharp/IrcClient.Commands.cs">
|
||||
<Files>
|
||||
<File FileName="ChatSharp/IrcClient.cs" Line="32" Column="32" />
|
||||
<File FileName="ChatSharp/IrcClient.Commands.cs" Line="10" Column="10" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||
</Properties>
|
|
@ -17,7 +17,7 @@ namespace ChatSharp
|
|||
if (!destinations.Any()) throw new InvalidOperationException("Message must have at least one target.");
|
||||
if (illegalCharacters.Any(message.Contains)) throw new ArgumentException("Illegal characters are present in message.", "message");
|
||||
string to = string.Join(",", destinations);
|
||||
SendRawMessage("PRIVMSG {0} :{1}", to, message);
|
||||
SendRawMessage("PRIVMSG {0} :{1}{2}", to, PrivmsgPrefix, message);
|
||||
}
|
||||
|
||||
public void SendAction(string message, params string[] destinations)
|
||||
|
@ -26,7 +26,7 @@ namespace ChatSharp
|
|||
if (!destinations.Any()) throw new InvalidOperationException("Message must have at least one target.");
|
||||
if (illegalCharacters.Any(message.Contains)) throw new ArgumentException("Illegal characters are present in message.", "message");
|
||||
string to = string.Join(",", destinations);
|
||||
SendRawMessage("PRIVMSG {0} :\x0001ACTION {1}\x0001", to, message);
|
||||
SendRawMessage("PRIVMSG {0} :\x0001ACTION {1}{2}\x0001", to, PrivmsgPrefix, message);
|
||||
}
|
||||
|
||||
public void PartChannel(string channel)
|
||||
|
|
|
@ -72,7 +72,8 @@ namespace ChatSharp
|
|||
public ChannelCollection Channels { get; private set; }
|
||||
public ClientSettings Settings { get; set; }
|
||||
public RequestManager RequestManager { get; set; }
|
||||
public ServerInfo ServerInfo { get; set; }
|
||||
public ServerInfo ServerInfo { get; set; }
|
||||
public string PrivmsgPrefix { get; set; }
|
||||
|
||||
public IrcClient(string serverAddress, IrcUser user, bool useSSL = false)
|
||||
{
|
||||
|
@ -88,7 +89,8 @@ namespace ChatSharp
|
|||
MessageHandlers.RegisterDefaultHandlers(this);
|
||||
RequestManager = new RequestManager();
|
||||
UseSSL = useSSL;
|
||||
WriteQueue = new ConcurrentQueue<string>();
|
||||
WriteQueue = new ConcurrentQueue<string>();
|
||||
PrivmsgPrefix = "";
|
||||
}
|
||||
|
||||
public void ConnectAsync()
|
||||
|
|
Loading…
Reference in New Issue