ID:146938
 
I created two hidden administrator verbs, and a proc that handles detection. However, although I know I reference the proc in /mob/Login(), it doesn't seem to give me the verbs that I defined, nor does it show the debug line that I inserted in order to determine where the procedure isn't working.

This is the coding that I have that handles the sending of the verbs:

var
global
list/admin["Drafonis"]
list/banned

mob/proc/acheck(mob/M as mob)
if(admin.Find(M.key))
M.verbs += /mob/verb/Boot
M.verbs += /mob/verb/Ban
M << "You now have administrator access!"

mob/Login()
acheck(src)
..()


A better way would be not to make the verbs under mob. Instead do something like:

mob
Admin
verb
Blah()
//blah
Blah2()

proc
mob/proc/acheck(mob/M as mob)
if(Admin.Find(M.key))
M.verbs += typesof(/mob/Admin/verb)
else
return
var/list/Admin = list("Drafonis")


That should work.

You might want to check out if that doesn't work : http://developer.byond.com/hub/N1ghtW1ng/N_Admin

Some things aren't working 100 % but for the most part it works. (It is not published yet publically for that reason)