Page MenuHomeDevCentral

D824.id2085.diff
No OneTemporary

D824.id2085.diff

diff --git a/Daeghrefn/Communication.tcl b/Daeghrefn/Communication.tcl
--- a/Daeghrefn/Communication.tcl
+++ b/Daeghrefn/Communication.tcl
@@ -310,8 +310,15 @@
#!pub or !twit or !tweet
#The account is channel dependant
proc pub:twitter {nick uhost handle chan text} {
- if {$chan == "#wikipedia-fr"} {
- set account wikipediafr
+ set account [registry get twitter.channels.$chan.account]
+ set is_protected [registry get twitter.channels.$chan.protected]
+
+ if {$account == ""} {
+ 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"} {
set who [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."
@@ -319,12 +326,8 @@
} {
append text " — $who"
}
- } elseif {$chan == "#wolfplex"} {
- set account wolfplex
- } {
- putquick "NOTICE $nick :!pub n'est pas activé sur le canal $chan"
- return
}
+
twitterpublish $account $nick $text
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 17:41 (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2264757
Default Alt Text
D824.id2085.diff (1 KB)

Event Timeline