# Determines if the specified handle on the specified channel
# is allowed to run a Wikidata comamnd.
procareWikidataCommandsAllowed{chanhandle}{
if{[matchattr$handleD]}{
return1
}
isWikidataChannel$chan
}
# Handles .+surname command
procpub:surname{nickuhosthandlechanarg}{
if{![areWikidataCommandsAllowed$chan$handle]}{
return0
}
if{[isAcceptableItemTitle$arg]}{
create_surname$arg"serv $chan"
return1
}{
putserv"PRIVMSG $chan :$nick : ne sont gérés comme que les caractères alphanumériques, le tiret, l'apostrophe droite, de même que tout ce qui n'est pas ASCII standard."
}
return0
}
# Handles .+surname command
procdcc:surname{handleidxarg}{
if{[isAcceptableItemTitle$arg]}{
create_surname$arg"dcc $idx"
return1
}{
putdcc$idx"crée cet item manuellement, je ne suis pas conçu pour gérer ces caractères dans le titre."
}
return0
}
# Creates a surname
# @param $title the item title
# @param $state the state to pass to the create command callback (here with a mode and a target to print result)