@@ -48,8 +48,8 @@ class NickAuth(callbacks.Plugin):
48
48
This plugin allows users to use their network services account to
49
49
authenticate to the bot.
50
50
51
- They first have to use ``@nickauth nick add <the nick >`` while being
52
- identified to the bot and then use ``@auth`` when they want to
51
+ They first have to use ``@nickauth nick add <services account name >`` while
52
+ identified to the bot, and then use ``@auth`` when they want to
53
53
identify to the bot.
54
54
"""
55
55
@@ -59,24 +59,24 @@ def __init__(self, irc):
59
59
class nick (callbacks .Commands ):
60
60
def _check_auth (self , irc , msg , user ):
61
61
if user is None :
62
- irc .error (_ ('You are not authenticated .' ), Raise = True )
62
+ irc .error (_ ('You are not logged in to the bot .' ), Raise = True )
63
63
if not user .checkHostmask (msg .prefix ):
64
64
try :
65
65
u = ircdb .users .getUser (msg .prefix )
66
66
except KeyError :
67
- irc .error (_ ('You are not authenticated .' ),
67
+ irc .error (_ ('You are not logged in to the bot .' ),
68
68
Raise = True )
69
69
if not u ._checkCapability ('owner' ):
70
70
irc .error (_ ('You must be owner to do that.' ),
71
71
Raise = True )
72
72
73
73
@internationalizeDocstring
74
74
def add (self , irc , msg , args , network , user , nick ):
75
- """[<network>] <user> <nick >
75
+ """[<network>] [<bot username>] <account >
76
76
77
- Add <nick > to the list of nicks owned by the <user> on the
78
- <network>. You have to register this nick to the network
79
- services to be authenticated .
77
+ Add <account > to the list of network services accounts owned by
78
+ <bot username> on < network>. <bot username> is only required if you
79
+ are not already logged in to Limnoria .
80
80
<network> defaults to the current network.
81
81
"""
82
82
network = network .network or irc .network
@@ -85,19 +85,20 @@ def add(self, irc, msg, args, network, user, nick):
85
85
try :
86
86
user .addNick (network , nick )
87
87
except KeyError :
88
- irc .error (_ ('This nick is already used by someone on this '
89
- ' network.' ), Raise = True )
88
+ irc .error (_ ('This services account is already used by someone '
89
+ 'on this network.' ), Raise = True )
90
90
irc .replySuccess ()
91
91
add = wrap (add , [optional ('networkIrc' ),
92
92
optional ('otherUser' ),
93
93
'nick' ])
94
94
95
95
@internationalizeDocstring
96
96
def remove (self , irc , msg , args , network , user , nick ):
97
- """[<network>] <user> <nick >
97
+ """[<network>] [<bot username>] <account >
98
98
99
- Remove <nick> from the list of nicks owned by the <user> on the
100
- <network>.
99
+ Remove <account> from the list of network services accounts owned by
100
+ <bot username> on <network>. <bot username> is only required if you
101
+ are not already logged in to Limnoria.
101
102
<network> defaults to the current network.
102
103
"""
103
104
network = network .network or irc .network
@@ -106,18 +107,19 @@ def remove(self, irc, msg, args, network, user, nick):
106
107
try :
107
108
user .removeNick (network , nick )
108
109
except KeyError :
109
- irc .error (_ ('This nick is not registered to you on this '
110
- ' network.' ), Raise = True )
110
+ irc .error (_ ('This services account is not registered to you on '
111
+ 'this network.' ), Raise = True )
111
112
irc .replySuccess ()
112
113
remove = wrap (remove , [optional ('networkIrc' ),
113
114
optional ('otherUser' ),
114
115
'nick' ])
115
116
116
117
@internationalizeDocstring
117
118
def list (self , irc , msg , args , network , user ):
118
- """[<network>] [<user >]
119
+ """[<network>] [<bot username >]
119
120
120
- Lists nicks of the <user> on the network.
121
+ Lists services accounts registered to <bot username> on the network,
122
+ or your own bot account if no username is given.
121
123
<network> defaults to the current network.
122
124
"""
123
125
network = network .network or irc .network
@@ -135,11 +137,11 @@ def list(self, irc, msg, args, network, user):
135
137
raise KeyError
136
138
except KeyError :
137
139
if user == ircdb .users .getUser (msg .prefix ):
138
- irc .error (_ ('You have no recognized nick on this '
139
- ' network.' ), Raise = True )
140
+ irc .error (_ ('You have no recognized services accounts on '
141
+ 'this network.' ), Raise = True )
140
142
else :
141
- irc .error (_ ('%s has no recognized nick on this '
142
- 'network.' ) % user .name , Raise = True )
143
+ irc .error (_ ('%s has no recognized services accounts on this '
144
+ 'network.' ) % user .name , Raise = True )
143
145
list = wrap (list , [optional ('networkIrc' ),
144
146
optional ('otherUser' )])
145
147
@@ -148,7 +150,7 @@ def auth(self, irc, msg, args):
148
150
"""takes no argument
149
151
150
152
Tries to authenticate you using network services.
151
- If you get no reply, it means you are not authenticated to the
153
+ If you get no reply, it means you are not authenticated to
152
154
network services."""
153
155
nick = ircutils .toLower (msg .nick )
154
156
self ._requests [(irc .network , msg .nick )] = (time .time (), msg .prefix , irc )
@@ -183,7 +185,7 @@ def do330(self, irc, msg):
183
185
ircdb .users .setUser (user , flush = False )
184
186
irc .reply (_ ('You are now authenticated as %s.' ) % user .name )
185
187
else :
186
- irc .error (_ ('No user claimed the nick %s on this network. '
188
+ irc .error (_ ('No user claimed the account %s on this network. '
187
189
'If this is you, you should connect with an other '
188
190
'method and use the "nickauth nick add" command, '
189
191
'or ask the owner of the bot to do it.' )
0 commit comments