ID:554246
 
Code:

Topic

mob
Topic(href,href_list[])
switch(href_list["action"])
if("PM")
var/msg = input("What would you like to privately say to [src] ([src.key])?","Private Message") as text|null
usr.Filter_Text(msg,"Private-Message",src)
. = ..()

mob
proc
Filter_Text(msg, chat, mob/target)

switch(chat)
if("World-Say")
world<<output("<font color = #0174DF>[admin ? "{[admin_tag]}" : ""][guild ? "[guildtag]" : ""]<font color=gray>{[src.race]}<font color = silver>[src]: <font color=white>[msg]","Chat")
if("Local-Say")
view(src)<<output("<font color = #3399FF>{[src]}: <font color = white>[msg]","Chat")
if("Admin-Say")
for(var/mob/M in world)
if(M.admin)
M<<output("<font color=#00aabb>{Admin Say}<font color=red>{[src]}: <font color=#ff5f5f>[msg]","Chat")
if("Guild-Say")
for(var/mob/M in world)
if(M.guildname == src.guildname)
M<<output("[src.guildtag]<font color=#59E817>[src]: <font color=white>[msg]","Chat")
if("Guild-Announcement")
for(var/mob/M in world)
if(M.guildname == src.guildname)
M<<output("<font color=#66CD00>Guild Alert from [src]:","Chat")
M<<output("[msg]","Chat")
if("Private-Message")
src<<output("<font color=blue><--(PM) To [target]:</font color> [msg]","Chat")
target<<output("<font color=red>-->(<a href=?src=\ref[src];action=PM>PM</a>) From [src]:</font color> [msg]","Chat")

Problem description:
Href will open input twice

Twice like in "it opens two inputs at once" or in "it opens the input, then opens it again after it has been submitted"?
It opens it again after it has been submitted.
mob
var
list
BlockList = list()
PM = 1
verb
PM()
set hidden = 1
var/list/players = list()
for(var/mob/Player/M in world)
if(M.client && M.PM) players += M
if(M == usr) players-=M
if(M.creating) players-=M
if(usr.key in M.BlockList) players-=M
players += "Nevermind"
var/mob/M = input("Who would you like to privately message?","Private Message")as null|anything in players
if(!M || M == "Nevermind") return
var/msg = input("What would you like to privately say to [M] ([M.key])?","Private Message") as text|null
if(!msg) return
if(!M.PM) {usr<<"<font color=red>[M] has turned off their PM</font color>"; return}
if(usr.key in M.BlockList){usr<<"<font color=red>[M] has blocked your key</font color>"; return}
if(M.key in usr.BlockList){usr<<"<font color=red>You have [M] blocked</font color>"; return}
if(M.creating){usr<<"<font color=red>You cannot talk to [M]. Because he is in character selection process</font color>"; return}
usr.Filter_Text(msg,"Private-Message",M)


And thats the PM code if it helps too