/
IServer.cs
53 lines (47 loc) · 2.4 KB
/
IServer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma warning disable 1591
using System.Collections.Generic;
using System.Windows.Forms;
using Defectively.UI;
namespace Defectively.Extension
{
public interface IServer
{
void PrintToConsole(string content, ConsoleStyle style);
string ComposePrefix(string accountId);
void SendPacketTo(string id, string packet);
void SendPacketToAll(string packet);
void SendPacketToChannel(string channelId, string packet);
void SendPacketToAllExceptTo(string exceptId, string packet);
void SendPacketToChannelExceptTo(string exceptId, string channelId, string packet);
void SendMessagePacketTo(string id, MessagePacket packet);
void SendMessagePacketToAll(MessagePacket packet);
void SendMessagePacketToAllExceptTo(string exceptId, MessagePacket packet);
void SendMessagePacketToChannelExceptTo(string exceptId, string channelId, MessagePacket packet);
void CreatePunishment(Punishment punishment);
Account GetAccountById(string id);
Rank GetRankById(string id);
Punishment GetPunishment(string accountId);
bool CheckForPunishment(string accountId);
void DisposePunishment(string accountId);
void InvokeInternalEvent(Event e, params object[] args);
void InvokeEvent(DynamicEvent e);
void CancelInternalMessageHandling();
string Serialize(object content, bool indented);
T Deserialize<T>(string content);
void DisplayForm(Form form);
List<string> GetAllConnectedIds();
void Enqueue(MessagePacket messagePacket);
bool AccountHasLuvaValue(string accountId, string luvaValue);
void SendLuvaNoticeTo(string accountId, string luvaValue);
void RegisterSeverity(string luvaValue, int severityLevel);
void DisposeConnectionById(string accountId);
void SetAccountState(string accountId, bool online);
void CreateChannel(string id, string name, bool hidden, Enumerations.ChannelJoinMode restrictions, IExtension extension);
void CreateChannel(Channel channel, IExtension extension);
void MoveAccountTo(string accountId, string channelId);
void RemoveChannel(string id, IExtension extension);
bool IsAccountInChannel(string accountId, string channelId);
List<string> GetAllIdsInChannel(string channelId);
void ShowNotification(Notification notification);
}
}