}
@client[:privmsg] = proc { |data|
m = PrivMessage.new(self, server, data[:source], data[:target], data[:message])
- debug "Message target is #{data[:target].inspect}"
- debug "Bot is #{myself.inspect}"
+ # debug "Message source is #{data[:source].inspect}"
+ # debug "Message target is #{data[:target].inspect}"
+ # debug "Bot is #{myself.inspect}"
# TODO use the new Netmask class
# @config['irc.ignore_users'].each { |mask| return if Irc.netmaskmatch(mask,m.source) }
debug "Saving"
save
debug "Cleaning up"
- @plugins.cleanup
+ @save_mutex.synchronize do
+ @plugins.cleanup
+ end
# debug "Closing registries"
# @registry.close
debug "Cleaning up the db environment"
# call the rescan method for all of the botmodules
def rescan
- @lang.rescan
- @plugins.rescan
+ @save_mutex.synchronize do
+ @lang.rescan
+ @plugins.rescan
+ end
end
# channel:: channel to join