summaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Plugins
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-24 15:15:58 +0100
committertv <tv@krebsco.de>2019-01-24 15:15:58 +0100
commita4b7708483dd32bc7256288faefa300d3fc13f7b (patch)
treee65995fe227657a262f2c990ef382227859c7784 /src/Reaktor/Plugins
parent34b66e54660d40378020058714e9499e86d3d96b (diff)
Reaktor.Plugins.System: release -> regain
Diffstat (limited to 'src/Reaktor/Plugins')
-rw-r--r--src/Reaktor/Plugins/Register.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Reaktor/Plugins/Register.hs b/src/Reaktor/Plugins/Register.hs
index ec3a11e..0809006 100644
--- a/src/Reaktor/Plugins/Register.hs
+++ b/src/Reaktor/Plugins/Register.hs
@@ -51,8 +51,8 @@ new Config{..} Actions{..} = do
isNickServEnabled = aIsSecure && isJust cNickServ
Just ConfigNickServ{..} = cNickServ
- release nick pass = do
- aSend (privmsg "NickServ" ["RELEASE", nick, pass])
+ regain nick pass = do
+ aSend (privmsg "NickServ" ["REGAIN", nick, pass])
channelsArg = BS.intercalate "," cChannels
-- TODO make this similar to privmsg (i.e. don't aSend)
@@ -112,7 +112,7 @@ new Config{..} Actions{..} = do
Message _ "001" [msgtarget,_text] -> do
nick <- aGetNick
aSend (privmsg "NickServ" ["IDENTIFY", nick, pass])
- when (msgtarget /= nick) (release nick pass)
+ when (msgtarget /= nick) (regain nick pass)
-- TODO structured prefix, and check just for "NickServ"?
Message (Just prefix) "NOTICE" (msgtarget:text:[]) ->
@@ -124,9 +124,6 @@ new Config{..} Actions{..} = do
-- otherwise join at NICK
when (msgtarget == nick) join
- | text == stx nick <> " has been released." -> do
- aSend (Message Nothing "NICK" [nick])
-
| text == "Invalid password for " <> stx nick <> "." -> do
-- TODO warning
when (msgtarget == nick) join
@@ -153,6 +150,6 @@ new Config{..} Actions{..} = do
when (res == nick) $
case msgtarget of
"*" -> useNextNickTemporarily
- _ -> release nick pass
+ _ -> regain nick pass
_ -> pure ()