|
@@ -1,6 +1,6 @@
|
|
# CIMS: Community IRC Messaging Service
|
|
# CIMS: Community IRC Messaging Service
|
|
# CIMS formerly known as MNET (Message Network)
|
|
# CIMS formerly known as MNET (Message Network)
|
|
-# Multiple Network Interconnection Script
|
|
|
|
|
|
+# Multiple Network Interconnection MASTER Script
|
|
# Copyright (C) 2004 Paul-Dieter Klumpp
|
|
# Copyright (C) 2004 Paul-Dieter Klumpp
|
|
#
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# This program is free software; you can redistribute it and/or
|
|
@@ -110,32 +110,16 @@ proc ::cims::interconnect::send_from_bind {nick mask hand chan text} {
|
|
::cims::interconnect::send "$text"
|
|
::cims::interconnect::send "$text"
|
|
}
|
|
}
|
|
|
|
|
|
-proc ::cims::timeout_reply_from_ic_for_netbot {bcid network freqname source nick} {
|
|
|
|
- variable mnet_reached_users
|
|
|
|
- variable mnet_reached_userlist
|
|
|
|
- variable mnet_reached_chans
|
|
|
|
-
|
|
|
|
- # clean $name and $source
|
|
|
|
- set freqname [::putils::kill_spaces $freqname]
|
|
|
|
- set source [::putils::kill_spaces $source]
|
|
|
|
-
|
|
|
|
- # easify variables
|
|
|
|
- set userlist $mnet_reached_userlist($freqname,$source)
|
|
|
|
- set user_cnt [llength $userlist]
|
|
|
|
- set mnet_reached_users($freqname,$source) $user_cnt
|
|
|
|
|
|
+proc ::cims::timeout_reply_from_ic_for_netbot {netbot network freqname source} {
|
|
|
|
+ set bcid $::cims::interconnect::sources($freqname,$source)
|
|
|
|
|
|
- set chan_cnt $mnet_reached_chans($freqname,$source)
|
|
|
|
|
|
+ if {[info exists ::cims::interconnect::receive_count($bcid)]} {
|
|
|
|
+ set output "$::cims::interconnect::receive_count($bcid)"
|
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
|
- # inzwischen drfte auch die antwort gekommen sein.. also jetzt mnet_reached_* auswerten nach timeout..
|
|
|
|
-
|
|
|
|
- # make stats channel-dependent
|
|
|
|
- #putlog "::cims:: * userlist is finally: $userlist "
|
|
|
|
- putlog "::cims:: * After ALL: Count_Users: $user_cnt Count_Channels: $mnet_reached_chans($freqname,$source)"
|
|
|
|
-
|
|
|
|
# Give him a reply.
|
|
# Give him a reply.
|
|
- ::cims::put_bot $rec_botnick "mnet_answer $network $freqname $source $users $count_channels $unique_userlist"
|
|
|
|
-
|
|
|
|
|
|
+ ::cims::put_bot $netbot "mnet_interconnect_answer $network $freqname $source $output"
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
proc ::cims::timeout_reply_from_local_for_ic {bcid network freqname source} {
|
|
proc ::cims::timeout_reply_from_local_for_ic {bcid network freqname source} {
|
|
@@ -231,7 +215,9 @@ proc ::cims::timeout_reply_from_local_for_netbots_plugin {freqname source} {
|
|
upvar output output
|
|
upvar output output
|
|
set bcid $::cims::interconnect::sources($freqname,$source)
|
|
set bcid $::cims::interconnect::sources($freqname,$source)
|
|
|
|
|
|
- set output "$output $::cims::interconnect::receive_count($bcid)"
|
|
|
|
|
|
+ if {[info exists ::cims::interconnect::receive_count($bcid)]} {
|
|
|
|
+ set output "$output $::cims::interconnect::receive_count($bcid)"
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
# this is the stuff we read on the console.
|
|
# this is the stuff we read on the console.
|
|
@@ -424,7 +410,7 @@ proc ::cims::message_from_netbot_to_plugin {netbot network freqname source nick
|
|
# receive answers from the other networks
|
|
# receive answers from the other networks
|
|
# in the meantime, we get all the BC_RE replies and counts.
|
|
# in the meantime, we get all the BC_RE replies and counts.
|
|
# Now, we should get that count and send it to originating netbot.
|
|
# Now, we should get that count and send it to originating netbot.
|
|
- #utimer 4 "::cims::timeout_reply_from_ic_for_netbot $netbot $network $freqname $source $nick"
|
|
|
|
|
|
+ utimer 5 "::cims::timeout_reply_from_ic_for_netbot $netbot $network $freqname $source"
|
|
|
|
|
|
# send an own answer to the originating netbot
|
|
# send an own answer to the originating netbot
|
|
|
|
|
|
@@ -444,7 +430,7 @@ proc ::cims::interconnect::main {} {
|
|
variable mnet_interconnect_version
|
|
variable mnet_interconnect_version
|
|
variable pipe
|
|
variable pipe
|
|
|
|
|
|
- putlog "mnet! = mnet interconnection script loaded: $mnet_interconnect_version"
|
|
|
|
|
|
+ putlog "mnet! = mnet interconnection MASTER script loaded: $mnet_interconnect_version"
|
|
|
|
|
|
::cims::interconnect::bindings
|
|
::cims::interconnect::bindings
|
|
::cims::interconnect::connect
|
|
::cims::interconnect::connect
|