ID:139358
 
Code:
mob/verb/OOC(t as text)
for(var/client/p)
if(p.mob.toggles_ooc)
if(p.mob.name in admins)
p << output("<a href='?src=\ref[usr];action=mute' class='villageicon'>\icon['100px-Akatsuki_Symbol.svg.png']</span></a><span class='villageicon'>\icon[village_chat[usr.village]]</span><a href='?src=\ref[usr];action=whisper' class='[Checker_GMColorUSR]'>[usr]</span></a>: <span class='message'>[q_parser.parse(t)]</span></span></span>", "out_chat")
else
p << output("[t]","out_chat")

//the above code is merely for test purposes.




mob/Topic(href,href_list[])
switch(href_list["action"])
if("mute")
var/mob/x = usr
if(muted)
muted = 0
world << "[name] has been unmuted by <span class='[Checker_GMColorX]'>[x]</span>"
else
var/timer = round(max(0,input("Select the amount of time to mute [name] in minutes", "Admin Commands - Muting: [name]") as num|null))
if(!timer) timer = 10
var/reason = input("Please type a reason for muting [name]","Admin Commands - Muting: [name]") as text|null
if(!reason) reason = "being a pest"
muted = round(timer*60)
world << "[name] is muted by <span class='[Checker_GMColorX]'>[x]</span> for [timer] minutes ([timer*60] seconds) for [reason]"
var/mob/M = src
src = null
spawn()
M:Timer_Mute()

if("whisper")
var/t = input("What would you like to whisper to [src]?","Chat Commands") as text|null
if(!t) return
usr.whisperb(src, t)

else
. = ..()


Problem description:
I cant remember if im removed something or not in this code but as far as i recall at one stage this code worked perfectly. and by the looks of things it now no longer works.

The code itself like the gibberish if statements etc mean nothing. its simply not reading the href clicks at all by the looks of things, can anyone see a problem in the code or why this may be failing =\

only reason i came back to looking at this code (after storing it in my not in use dm file cleaning up my project) was cause im trying to use the html href to make a custom right click menu using tooltips.. To no success currently due to this problem


Any additional information needed can be given at a drop of a hat. Just post and ill get back to ya.

~Midget
Usually id just delete my post if i found the answer and got no responses, but ill make an exception for this one just incase some other person comes across it and has a similar problem. Even if it may be a small stupid thing.

I used a demo/library supplied by Divine Traveller that makes tooltips. This library has a client/topic and due to this my mob/topic was not launching correctly

The simple fix was to obviously return the non ending topic.

client
Topic(href, hlist[])
switch(hlist["action"])
if("Justforshow")
src << "Cluck cluck"
.=..() //Did not have this in previously. Adding of these 6 Symbols fixed my problems.
In response to Midgetbuster
It's not because you're "returning an unending proc" it's because you're calling the parent, which lets other uses of that proc in your code to execute properly without blocking others.

Chances are you had another instance of Topic() in your code somewhere that was blocking the call you were expecting.
In response to Nadrew
Yea. I had mob/Topic which i wanted to call. but client/Topic (due to not calling the parent" would not launch mob/Topic.