mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
irc: Move to Cluster::publish()
This commit is contained in:
parent
387db42fea
commit
3d3706440b
1 changed files with 7 additions and 7 deletions
|
@ -48,7 +48,7 @@ event dcc_transfer_add(host: addr, p: port, info: Info) &is_used
|
||||||
{
|
{
|
||||||
@if ( Cluster::local_node_type() == Cluster::PROXY ||
|
@if ( Cluster::local_node_type() == Cluster::PROXY ||
|
||||||
Cluster::local_node_type() == Cluster::MANAGER )
|
Cluster::local_node_type() == Cluster::MANAGER )
|
||||||
Broker::publish(Cluster::worker_topic, dcc_transfer_add, host, p, info);
|
Cluster::publish(Cluster::worker_topic, dcc_transfer_add, host, p, info);
|
||||||
@else
|
@else
|
||||||
dcc_expected_transfers[host, p] = info;
|
dcc_expected_transfers[host, p] = info;
|
||||||
Analyzer::schedule_analyzer(0.0.0.0, host, p,
|
Analyzer::schedule_analyzer(0.0.0.0, host, p,
|
||||||
|
@ -60,7 +60,7 @@ event dcc_transfer_remove(host: addr, p: port) &is_used
|
||||||
{
|
{
|
||||||
@if ( Cluster::local_node_type() == Cluster::PROXY ||
|
@if ( Cluster::local_node_type() == Cluster::PROXY ||
|
||||||
Cluster::local_node_type() == Cluster::MANAGER )
|
Cluster::local_node_type() == Cluster::MANAGER )
|
||||||
Broker::publish(Cluster::worker_topic, dcc_transfer_remove, host, p);
|
Cluster::publish(Cluster::worker_topic, dcc_transfer_remove, host, p);
|
||||||
@else
|
@else
|
||||||
delete dcc_expected_transfers[host, p];
|
delete dcc_expected_transfers[host, p];
|
||||||
@endif
|
@endif
|
||||||
|
@ -90,7 +90,7 @@ function log_dcc(f: fa_file)
|
||||||
delete dcc_expected_transfers[cid$resp_h, cid$resp_p];
|
delete dcc_expected_transfers[cid$resp_h, cid$resp_p];
|
||||||
|
|
||||||
@if ( Cluster::is_enabled() )
|
@if ( Cluster::is_enabled() )
|
||||||
Broker::publish(dcc_relay_topic(), dcc_transfer_remove,
|
Cluster::publish(dcc_relay_topic(), dcc_transfer_remove,
|
||||||
cid$resp_h, cid$resp_p);
|
cid$resp_h, cid$resp_p);
|
||||||
@endif
|
@endif
|
||||||
return;
|
return;
|
||||||
|
@ -118,7 +118,7 @@ event irc_dcc_message(c: connection, is_orig: bool,
|
||||||
dcc_expected_transfers[address, p] = c$irc;
|
dcc_expected_transfers[address, p] = c$irc;
|
||||||
|
|
||||||
@if ( Cluster::is_enabled() )
|
@if ( Cluster::is_enabled() )
|
||||||
Broker::publish(dcc_relay_topic(), dcc_transfer_add, address, p, c$irc);
|
Cluster::publish(dcc_relay_topic(), dcc_transfer_add, address, p, c$irc);
|
||||||
@endif
|
@endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ hook finalize_irc_data(c: connection)
|
||||||
delete dcc_expected_transfers[c$id$resp_h, c$id$resp_p];
|
delete dcc_expected_transfers[c$id$resp_h, c$id$resp_p];
|
||||||
|
|
||||||
@if ( Cluster::is_enabled() )
|
@if ( Cluster::is_enabled() )
|
||||||
Broker::publish(dcc_relay_topic(), dcc_transfer_remove,
|
Cluster::publish(dcc_relay_topic(), dcc_transfer_remove,
|
||||||
c$id$resp_h, c$id$resp_p);
|
c$id$resp_h, c$id$resp_p);
|
||||||
@endif
|
@endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue