    # File lib/rbot/core/remote.rb, line 46
          def remote_login(botusername, pwd)
            @remote_users = Hash.new unless defined? @remote_users
            n = BotUser.sanitize_username(botusername)
            k = n.to_sym
            raise "No such BotUser #{n}" unless include?(k)
            bu = @allbotusers[k]
            if bu.remote_login(pwd)
              raise "ran out of session ids!" if @remote_users.length == MAX_SESSION_ID
              session_id = rand(MAX_SESSION_ID)
              while @remote_users.has_key?(session_id)
                session_id = rand(MAX_SESSION_ID)
              end
              @remote_users[session_id] = bu
              return session_id
            end
            return false
          end