/trigger addreplace libera_idlerpg_login_join signal libera,irc_in2_353 "${text} =~ ^. #idlerpg :(.+ )?@idlebot( |$)" "" "/msg -server ${server} idlebot login user password"
This does not handle e.g. a previously opped idlebot_
changing its nickname to idlebot
.
This also does not handle a mode command with multiple modes.
/trigger addreplace libera_idlerpg_login_op signal libera,irc_in2_mode "${channel} == #idlerpg && ${text} == +o idlebot" "" "/msg -server ${server} idlebot login user password"
/set irc.look.nicks_hide_password nickserv,idlebot
/trigger addreplace idlerpg_password modifier "5000|irc_message_auth" "" "==^(login +[^ ]+ +|register +[^ ]+ +|newpass +)([^ ]+)(.*)==${re:1}${hide:*,${re:2}}${re:3}"
After trying to figure out how to adopt the code to use on IdleRPG on another server, I'm posting this updated generalized login when joining channel in case it helps anyone else:
command:1
IRPG_TRIGGER
SERVER
/server add
command)CHANNEL
#idlerpg
channelOP_BOT
idlerpg
bot; append op ranking2BOT
idlerpg
botIRPG_USER
IRPG_PASS
note 1: when looking for the idlebot
libera
only reportnick
, but some servers reportnick!name@address
so the command was updated to handle such situationsnote 2: I encountered different op status on the idlerpg bots, which translated to
&:&@
,@:@
,%:%
note 3: you can and may want to use secured data for these fields
And if all else fails, use:
to see what the trigger's parsing so that you can try to modify it to work for you