+
+ # update on ACTION if the user has enabled the option
+ def ctcp_listen(m)
+ return unless m.action?
+ return unless @registry[m.sourcenick + "_actions"]
+ update_status(m, :status => m.message, :notify => true)
+ end
+
+ # show or toggle action twitting
+ def actions(m, params)
+ case params[:toggle]
+ when 'on'
+ @registry[m.sourcenick + "_actions"] = true
+ m.okay
+ when 'off'
+ @registry.delete(m.sourcenick + "_actions")
+ m.okay
+ else
+ if @registry[m.sourcenick + "_actions"]
+ m.reply _("actions will be twitted")
+ else
+ m.reply _("actions will not be twitted")
+ end
+ end
+ end