瀏覽代碼

vim and numcl/maxcl support

Paul Klumpp 12 年之前
父節點
當前提交
ed5389bab1
共有 5 個文件被更改,包括 25 次插入8 次删除
  1. 3 1
      cims.tcl
  2. 2 0
      cims_admin.tcl
  3. 16 6
      cims_interconnect.tcl
  4. 3 1
      cims_interconnect_slave.tcl
  5. 1 0
      putils.tcl

+ 3 - 1
cims.tcl

@@ -16,6 +16,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+# vim: expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
+
 namespace eval ::cims {
   
   set configs_file "scripts/cims/cims_conf.tcl"
@@ -709,7 +711,7 @@ proc ::cims::receive_message {rec_botnick cmd rec_data} {
 	set rec_nickname [join [lindex $rec_data 2]]
 	#putlog "rec_nickname: '$rec_nickname'"
 
-	set rec_channel  [::putils::kill_spaces [join [lindex $rec_data 3]]]
+	set rec_channel  [join [lindex $rec_data 3]]
 
 	#set rec_text [::cims::clean_txt [join [lrange [split $rec_data] 4 end]]]
 

+ 2 - 0
cims_admin.tcl

@@ -17,6 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+# vim: expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
+
 namespace eval ::cims::admin {
   variable admin_channels {"#messagenet" "#quad.dev" "#qwnet"}
   variable mnet_admin_version "cims!A!1.14namespaced+savesettings"

+ 16 - 6
cims_interconnect.tcl

@@ -17,6 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+# vim: expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
 
 namespace eval ::cims::interconnect {
 	variable layout
@@ -114,11 +115,19 @@ proc ::cims::timeout_reply_from_ic_for_netbot {netbot network freqname source} {
 	set bcid $::cims::interconnect::sources($freqname,$source)
 
 	if {[info exists ::cims::interconnect::receive_count($bcid)]} {
-		set output "$::cims::interconnect::receive_count($bcid)"
+		set count_list $::cims::interconnect::receive_count($bcid)
+
+		set output_for_netbot "And to "
+		foreach {item count} $count_list {
+			set output_for_netbot "$output_for_netbot $count ${item}, "
+		}
+		set output_for_netbot "[string range $output_for_netbot 0 [expr [string length $output_for_netbot] - 2]"
+		set output_for_netbot "${output_for_netbot}."
+		putlog "w000000t: $output_for_netbot"
+		# Give him a reply.
+		::cims::put_bot $netbot "mnet_interconnect_answer $network $freqname $source $output_for_netbot"
 	} 
 
-	# Give him a reply.
-	::cims::put_bot $netbot "mnet_interconnect_answer $network $freqname $source $output"
 
 }
 
@@ -129,7 +138,8 @@ proc ::cims::timeout_reply_from_local_for_ic {bcid network freqname source} {
 
 	# clean $name and $source
 	set freqname [::putils::kill_spaces $freqname]
-	set source [::putils::kill_spaces $source]
+	#set source [::putils::kill_spaces $source]
+	putlog "source: $source"
 	
 	# easify variables
 	set userlist $mnet_reached_userlist($freqname,$source)
@@ -158,7 +168,7 @@ proc ::cims::message_from_interconnect {network freqname source nick text} {
   variable mnet_reached_chans
 
 	#putlog "freqname: $freqname"
-	#putlog "source: $source"
+	putlog "source: $source"
 	#putlog "nick: $nick"
 	#putlog "text: $text"
 
@@ -296,7 +306,7 @@ proc ::cims::interconnect::work {inputline} {
 
 		# in the meantime, we even get all replies and counts (by ::cims::). 
 		# Now, we should get that count and send it to the central as a reply. Hitting the original sender.
-		utimer 4 "::cims::timeout_reply_from_local_for_ic $bcid $network $freqname $source"
+		utimer 4 "::cims::timeout_reply_from_local_for_ic $bcid $network $freqname [list $source]"
 		
 
 	} elseif {[regexp -all {^WHO.*} $sub whole] > 0} {

+ 3 - 1
cims_interconnect_slave.tcl

@@ -17,6 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+# vim: expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
+
 namespace eval ::cims::interconnect {
 }
 
@@ -33,7 +35,7 @@ proc ::cims::interconnect::reply_from_icmaster {rec_botnick cmd rec_data} {
 	set rec_freqname  [::putils::kill_spaces $tmp_name]
 	#putlog  "name: '$name'"
 
-	set rec_source  [::putils::kill_spaces [join [lindex $rec_data 2]]]
+	set rec_source  [join [lindex $rec_data 2]]
 
 	set rec_text [join [lrange $rec_data 3 end]]
 	#putlog "rec_text: '$rec_text'"

+ 1 - 0
putils.tcl

@@ -1,5 +1,6 @@
 # putils
 
+# vim: expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
 
 
 namespace eval ::putils {