aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/quarg/quassel/types.py
blob: 36f385a52b218b926d8a6f6eeda46d51846d4d9d (plain) (blame)
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
from enum import Enum

class BufferType(Enum):
    INVALID = 0x0
    STATUS  = 0x1
    CHANNEL = 0x2
    QUERY   = 0x4
    GROUP   = 0x8

    @classmethod
    def describe(cls):
        return 'buffer type'

class MessageFlag(Enum):
    NONE       = 0x0
    SELF       = 0x1
    HIGHLIGHT  = 0x2
    REDIRECTED = 0x4
    SERVERMSG  = 0x8
    STATUSMSG  = 0x10
    IGNORED    = 0x20
    BACKLOG    = 0x80

    @classmethod
    def describe(cls):
        return 'message flag'

class MessageType(Enum):
    PRIVMSG       = 0x1
    NOTICE        = 0x2
    ACTION        = 0x4
    NICK          = 0x8
    MODE          = 0x10
    JOIN          = 0x20
    PART          = 0x40
    QUIT          = 0x80
    KICK          = 0x100
    KILL          = 0x200
    SERVER        = 0x400
    INFO          = 0x800
    ERROR         = 0x1000
    # as far as I can see DAYCHANGE does not show up in the database
    DAYCHANGE     = 0x2000
    TOPIC         = 0x4000
    NETSPLIT_JOIN = 0x8000
    NETSPLIT_QUIT = 0x10000
    INVITE        = 0x20000

    @classmethod
    def describe(cls):
        return 'message type'