Skip to content

proxima/gossip-crystal

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

gossip

Gossip is a shard for integrating MUDs with the Gossip inter-mud chat network.

Installation

Add this to your application's shard.yml:

dependencies:
  gossip:
    github: proxima/gossip-crystal

Usage

require "gossip"

client = Gossip::Client.new "mud-name", "client-id", "client-secret"
spawn client.run

Enable verbose logging

client.verbose = true

Optionally, you can provide Gossip::Client a Proc which returns the MUD's online players.

client.player_list = ->{ ["Player1", "Player2"] }

or

client.player_list = ->{ acquire_player_list_somehow(); }

You can also use the client to inform Gossip of login/logoffs in real-time.

client.player_login.send "Player Two"
client.player_logoff.send "Player One"

Listen to broadcasts from other MUDs

spawn do
  loop do
    msg = client.broadcast.receive
  end
end

Development

TODO: tells (send/receive) TODO: reconnects, raise errors when disconnected

Contributing

  1. Fork it (https://github.com/your-github-user/gossip-crystal/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • proxima Christopher Lee - creator, maintainer

About

Crystal client for the Gossip MUD Chat Network

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published