Compare commits

...

7 Commits

Author SHA1 Message Date
1aab6b69c7
documentation: Update forge urls 2021-03-27 11:32:35 +01:00
Arthur Poulet
c21010a9d9
Merge pull request #18 from straight-shoota/patch-1
Fix dependency name
2021-01-25 11:36:08 +01:00
Johannes Müller
d84ffb1d0c
Fix dependency name 2021-01-08 22:26:40 +01:00
ffc405d1d4 Update version 0.5.1 2020-04-20 00:27:31 +02:00
82440d9290 Update makefile 2020-04-20 00:27:20 +02:00
Tatsiujin Chin
a1e382a7e6 update to crystal 0.34.0 2020-04-13 17:49:27 +08:00
ba7e04248b
Update version 2020-01-19 21:16:57 +01:00
5 changed files with 20 additions and 14 deletions

View File

@ -3,9 +3,7 @@ all: deps_opt test
test: test:
crystal spec crystal spec
deps: deps:
crystal deps install shards install
deps_update:
crystal deps update
deps_opt: deps_opt:
@[ -d lib/ ] || make deps @[ -d lib/ ] || make deps
doc: doc:

View File

@ -4,16 +4,17 @@ A crystal library to create irc client/bot/server.
## Installation ## Installation
[![travis](https://travis-ci.org/Meoowww/Crirc.svg)](https://travis-ci.org/Meoowww/Crirc) github mirror: [![travis](https://travis-ci.org/Meoowww/Crirc.svg)](https://travis-ci.org/Meoowww/Crirc)
To install the lib, you will have to add the Crirc dependancy to your project. To install the lib, you will have to add the Crirc dependency to your project.
Add this to your application's `shard.yml`: Add this to your application's `shard.yml`:
```yaml ```yaml
dependencies: dependencies:
Crirc: crirc:
github: Meoowww/Crirc git: https://git.sceptique.eu/Sceptique/Crirc
branch: master
``` ```
Then, run ``crystal deps install`` to fetch the lib. Then, run ``crystal deps install`` to fetch the lib.
@ -25,12 +26,12 @@ This explains the architecture and design on the library, and details the techni
Specifications (unit tests) are written into the `/spec` directory. Specifications (unit tests) are written into the `/spec` directory.
A full implementation of a bot is published and maintained on <https://github.com/Meoowww/DashBot>. A full implementation of a bot is published and maintained on <https://git.sceptique.eu/Sceptique/DashBot>.
## Contributing ## Contributing
1. Fork it ( https://github.com/Meoowww/Crirc/fork ) 1. Fork it ( https://git.sceptique.eu/Sceptique/Crirc/fork )
2. Create your feature branch (git checkout -b my-new-feature) 2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature') 3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature) 4. Push to the branch (git push origin my-new-feature)
@ -39,5 +40,5 @@ A full implementation of a bot is published and maintained on <https://github.co
## Contributors ## Contributors
- [Nephos](https://github.com/Nephos) Arthur Poulet - creator, maintainer - [Sceptique](https://git.sceptique.eu/Sceptique) Arthur Poulet - creator, maintainer
- [Damaia](https://github.com/Lucie-Dispot) Lucie Dispot - developer - [Damaia](https://github.com/Lucie-Dispot) Lucie Dispot - developer

View File

@ -1,9 +1,9 @@
name: crirc name: crirc
version: 0.1.1 version: 0.5.1
authors: authors:
- Arthur Poulet <arthur.poulet@sceptique.eu> - Arthur Poulet <arthur.poulet@sceptique.eu>
crystal: 0.31.1 crystal: 1.0.0
license: MIT license: MIT

View File

@ -8,11 +8,11 @@ class Crirc::Protocol::Chan < Crirc::Protocol::Target
getter timestamp : Int64 getter timestamp : Int64
def initialize(@message, @user) def initialize(@message, @user)
@timestamp = Time.now.to_unix @timestamp = Time.utc.to_unix
end end
def set_motd(@message, @user) def set_motd(@message, @user)
@timestamp = Time.now.to_unix @timestamp = Time.utc.to_unix
end end
end end

7
src/example_server.cr Normal file
View File

@ -0,0 +1,7 @@
require "./crirc"
server = Crirc::Network::Server.new "0.0.0.0", 6667, ssl: false
server.start
client.close