- # should the message handler be excuted in new thread?
- # if set to true or false, this overrides :thread option in map. if it's nil,
- # the map option takes effect
- attr_accessor :thread
- alias :thread? :thread
+ # set this to true if the method that delegates the message is run in a thread
+ attr_accessor :in_thread
+ alias :in_thread? :in_thread
+
+ def inspect(fields=nil)
+ ret = self.__to_s__[0..-2]
+ ret << ' bot=' << @bot.__to_s__
+ ret << ' server=' << server.to_s
+ ret << ' time=' << time.to_s
+ ret << ' source=' << source.to_s
+ ret << ' target=' << target.to_s
+ ret << ' message=' << message.inspect
+ ret << ' logmessage=' << logmessage.inspect
+ ret << ' plainmessage=' << plainmessage.inspect
+ ret << fields if fields
+ ret << ' (identified)' if identified?
+ ret << ' (addressed to me)' if address?
+ ret << ' (replied)' if replied?
+ ret << ' (ignored)' if ignored?
+ ret << ' (in thread)' if in_thread?
+ ret << '>'
+ end