mirror of https://github.com/fluffle/goirc
Merge pull request #16 from StalkR/bot
state: nick: support for Bot mode (+B)
This commit is contained in:
commit
f8a786f9c7
|
@ -20,13 +20,14 @@ type Nick struct {
|
||||||
// This is only really useful for me, as we can't see other people's modes
|
// This is only really useful for me, as we can't see other people's modes
|
||||||
// without IRC operator privileges (and even then only on some IRCd's).
|
// without IRC operator privileges (and even then only on some IRCd's).
|
||||||
type NickMode struct {
|
type NickMode struct {
|
||||||
// MODE +i, +o, +w, +x, +z
|
// MODE +B, +i, +o, +w, +x, +z
|
||||||
Invisible, Oper, WallOps, HiddenHost, SSL bool
|
Bot, Invisible, Oper, WallOps, HiddenHost, SSL bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map *irc.NickMode fields to IRC mode characters and vice versa
|
// Map *irc.NickMode fields to IRC mode characters and vice versa
|
||||||
var StringToNickMode = map[string]string{}
|
var StringToNickMode = map[string]string{}
|
||||||
var NickModeToString = map[string]string{
|
var NickModeToString = map[string]string{
|
||||||
|
"Bot": "B",
|
||||||
"Invisible": "i",
|
"Invisible": "i",
|
||||||
"Oper": "o",
|
"Oper": "o",
|
||||||
"WallOps": "w",
|
"WallOps": "w",
|
||||||
|
@ -94,6 +95,8 @@ func (nk *Nick) ParseModes(modes string) {
|
||||||
modeop = true
|
modeop = true
|
||||||
case '-':
|
case '-':
|
||||||
modeop = false
|
modeop = false
|
||||||
|
case 'B':
|
||||||
|
nk.Modes.Bot = modeop
|
||||||
case 'i':
|
case 'i':
|
||||||
nk.Modes.Invisible = modeop
|
nk.Modes.Invisible = modeop
|
||||||
case 'o':
|
case 'o':
|
||||||
|
|
Loading…
Reference in New Issue