putquick"NOTICE $nick :!pub isn't n'est pas activé sur le canal $chan / !pub isn't enabled on channel $chan"
return
}
if{$is_protected=="1"}{
setwho[whois$nick]
if{$who==""}{
putquick"NOTICE $nick :Pour utiliser !pub sur $chan, vous devez disposer d'un cloak projet ou unaffiliated, être connecté depuis un host sans chiffre ou encore avoir votre user@host reconnu par mes soins."
return0
}{
appendtext" — $who"
}
}
twitterpublish$account$nick$text
}
proctwitter_message_len{}{return140}
proctwitterpublish{accountnicktext}{
if{$text==""}{
putquick"NOTICE $nick :Syntaxe : !pub <texte à publier sur identi.ca et Twitter>"
return
}
setlen[twitter_compute_len$text]
if{$len>[twitter_message_len]}{
putquick"NOTICE $nick :[twitter_message_len] caractères max, là il y en a $len ([twitter_get_short_url_length] par lien)."
return
}
if[twitterpost$account$text]{
putquick"NOTICE $nick :Publié sur Twitter"
return1
}{
putquick"NOTICE $nick :Non publié, une erreur a eu lieu."
}
}
# Extracts the id of the status from an URL or directly from this ID
#
# @param text The text containing the status ID
# @param If successful, will be set to the id of the status to retweet
# @return 1 if successful; otherwise, 0
proctwitter_try_extract_status{textstatus}{
upvar1$statusvalue
# Trivial case: value is already the status identifier