Socket
Book a DemoInstallSign in
Socket

warchat

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

warchat

0.0.10
bundlerRubygems
Version published
Maintainers
1
Created
Source

= Warchat

This project aims to create a simple ruby interface for connecting to Blizzard's Mobile Guild Chat.

= Features

  • SRP authentication
  • Guild Chat
  • Officer Chat
  • Whispers
  • Presence notifications

= Acknowledgements

A big thanks to Eike Siewertsen (http://www.github.com/fry), without whom this probably wouldn't be possible.

= Simple Usage example

This is a simple chat client that will let you talk in guild chat and receive messages.

require 'rubygems' require 'warchat'

USERNAME = '' PASSWORD = '' CHARACTER_NAME = '' CHARACTER_REALM = '' HOST = "m.us.wowarmory.com" #HOST = "m.eu.wowarmory.com" #HOST = "m.kr.wowarmory.com" PORT = 8780

client = Warchat::Chat::Client.new

client.on_establish = Proc.new do |response| client.login CHARACTER_NAME,CHARACTER_REALM end

client.on_message = Proc.new do |message| case message.type when Warchat::Chat::Message::CHAT_MSG_TYPE_GUILD_CHAT puts "[Guild] #{message.character.name}: #{message.body}" when Warchat::Chat::Message::CHAT_MSG_TYPE_GUILD_MOTD puts "MOTD: #{message.body}" when Warchat::Chat::Message::CHAT_MSG_TYPE_OFFICER_CHAT puts "[Officer] #{message.character.name}: #{message.body}" when Warchat::Chat::Message::CHAT_MSG_TYPE_WHISPER puts "[Whisper] #{message.character.name}: #{message.body}" end end

begin client.start(USERNAME,PASSWORD,HOST,PORT) loop do msg = gets.chomp client.message msg,Warchat::Chat::Message::CHAT_MSG_TYPE_GUILD_CHAT end rescue Interrupt => e client.close end

FAQs

Package last updated on 27 May 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.