Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
1aab6b69c7 | |||
|
c21010a9d9 | ||
|
d84ffb1d0c | ||
ffc405d1d4 | |||
82440d9290 | |||
|
a1e382a7e6 | ||
ba7e04248b |
4
Makefile
4
Makefile
|
@ -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:
|
||||||
|
|
15
README.md
15
README.md
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
7
src/example_server.cr
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
require "./crirc"
|
||||||
|
|
||||||
|
|
||||||
|
server = Crirc::Network::Server.new "0.0.0.0", 6667, ssl: false
|
||||||
|
server.start
|
||||||
|
|
||||||
|
client.close
|
Loading…
Reference in New Issue
Block a user