Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- === modified file 'plugins/Script/examples/access.lua'
- --- plugins/Script/examples/access.lua 2010-11-08 16:38:38 +0000
- +++ plugins/Script/examples/access.lua 2010-11-08 19:34:48 +0000
- @@ -190,6 +190,14 @@
- value = 1
- }
- +settings.authenticatebynick = {
- + alias = { authbynick = true },
- +
- + help = "registered users authentication method, 1 = by nick/password only, 0 = by cid/password first",
- +
- + value = 0
- +}
- +
- settings.botcid = {
- alias = { botid = true },
- @@ -663,9 +671,11 @@
- end
- if user.cid ~= cid then
- - if users.cids[cid] then
- - -- new cid taken...
- - return false, "CID taken by another registered user"
- + if settings.authenticatebynick.value == 0 then
- + if users.cids[cid] then
- + -- new cid taken...
- + return false, "CID taken by another registered user"
- + end
- end
- if user.cid then
- @@ -1046,7 +1056,13 @@
- local cid = c:getCID()
- local nick = c:getField("NI")
- - local user = get_user_c(c)
- + local user
- + if settings.authenticatebynick.value == 1 then
- + user = get_user(nil, nick)
- + else
- + user = get_user_c(c)
- + end
- +
- if not user then
- autil.dump(c, adchpp.AdcCommand_ERROR_PROTOCOL_GENERIC, "Can't find you now")
- return false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement