Mercurial > hg > egg-tcls
changeset 662:bb6aea76cdb4
feeds: Fix binds to actually work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 20 Feb 2021 17:35:07 +0200 |
parents | 721c8cef5039 |
children | 8bde8f798188 |
files | config.feeds.example feeds.tcl |
diffstat | 2 files changed, 8 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/config.feeds.example Fri Feb 19 21:06:20 2021 +0200 +++ b/config.feeds.example Sat Feb 20 17:35:07 2021 +0200 @@ -33,13 +33,15 @@ # Initialization proc called only by feeds.tcl proc feeds_init { } { # Bind commands - bind pubm - !feed* feeds_cmd_pubm + bind pub - !feed feeds_cmd_pub + bind pub - !feeds feeds_cmd_pub bind pub - !last feeds_cmd_pub_last - bind pubm - !lates* feeds_cmd_pubm_last + bind pub - !latest feeds_cmd_pub_last - bind msgm - !feed* feeds_cmd_msgm + bind msg - !feed feeds_cmd_msg + bind msg - !feeds feeds_cmd_msg bind msg - !last feeds_cmd_msg_last - bind msgm - !lates* feeds_cmd_msgm_last + bind msg - !latest feeds_cmd_msg_last }
--- a/feeds.tcl Fri Feb 19 21:06:20 2021 +0200 +++ b/feeds.tcl Sat Feb 20 17:35:07 2021 +0200 @@ -299,7 +299,8 @@ foreach {ukey uvalue} [array get feeds_channels] { if {[string match $ukey $uchan]} { - return [feeds_cmd $unick $uhost $uhand $uchan $uargs 1] + feeds_cmd $unick $uhost $uhand $uchan $uargs 1 + return 1 } } @@ -313,23 +314,6 @@ #------------------------------------------------------------------------- -proc feeds_cmdm_split {uargs} { - set rarglist [::textutil::split::splitx $uargs {\s+}] - return [join [lrange $rarglist 1 end] " "] -} - - -proc feeds_cmd_pubm {unick uhost uhand uchan uargs} { - return [feeds_cmd_pub $unick $uhost $uhand $uchan [feeds_cmdm_split $uargs]] -} - - -proc feeds_cmd_msgm {unick uhost uhand uargs} { - return [feeds_cmd_msg $unick $uhost $uhand [feeds_cmdm_split $uargs]] -} - - -#------------------------------------------------------------------------- # Script initialization #------------------------------------------------------------------------- putlog "$feeds_message"