Method: Codebot::Network#update_nickserv

Defined in:
lib/codebot/network.rb

#update_nickserv(disable, user, pass) ⇒ Object

Updates the NickServ authentication details of this network.

Parameters:

  • disable (Boolean)

    whether to disable NickServ, or nil to keep the current value.

  • user (String)

    the NickServ username, or nil to keep the current value

  • pass (String)

    the NickServ password, or nil to keep the current value



140
141
142
143
144
145
146
147
148
149
# File 'lib/codebot/network.rb', line 140

def update_nickserv(disable, user, pass)
  @nickserv_username = valid! user, valid_string(user), :@nickserv_username,
                              invalid_error: 'invalid NickServ username %s'
  @nickserv_password = valid! pass, valid_string(pass), :@nickserv_password,
                              invalid_error: 'invalid NickServ password %s'
  return unless disable

  @nickserv_username = nil
  @nickserv_password = nil
end