2017 © Pedro Peláez
 

library lightircparser

PHP parser for messages conforming to the IRC protocol including support for IRCv3.2 Message Tags

image

skycube/lightircparser

PHP parser for messages conforming to the IRC protocol including support for IRCv3.2 Message Tags

  • Monday, November 27, 2017
  • by zabouth
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 8 % Grown

The README.md

Synopsis

PHP parser for messages conforming to the IRC protocol including support for IRCv3.2 Message Tags, (*1)

Examples

Exmaple 1:

Message without Message Tags., (*2)

$msg = new Lightircparser\IRCMessage(":test!test@test.my.irc.server JOIN #test");
$msg->phrase();
echo $msg->to_json();

Output:, (*3)

{
    "ts": 1488459541399,
    "has_message_tags": false,
    "has_prefix": true,
    "message_tags": [],
    "prefix": {
        "nick": "test",
        "user": "test",
        "host": "test.my.irc.server"
    },
    "command": "JOIN",
    "params": [
        "#test"
    ],
    "raw": ":test!test@test.my.irc.server JOIN #test"
}
Exmaple 2:

Message with IRCv3.2 Message Tags., (*4)

$msg = new Lightircparser\IRCMessage("@display-name=TestUser;id=2362364236234634634;room-id=31462363463;sent-ts=1488375811149;admin=0;testp= :testuser!testuser@testuser.my.irc.server PRIVMSG #test :Hello! World");
$msg->phrase();
echo $msg->to_json();

Output:, (*5)

{
    "ts": 1488460013762,
    "has_message_tags": true,
    "has_prefix": true,
    "message_tags": {
        "display-name": "TestUser",
        "id": "2362364236234634634",
        "room-id": "31462363463",
        "sent-ts": "1488375811149",
        "admin": "0",
        "testp": null
    },
    "prefix": {
        "nick": "testuser",
        "user": "testuser",
        "host": "testuser.my.irc.server"
    },
    "command": "PRIVMSG",
    "params": [
        "#test",
        "Hello! World"
    ],
    "raw": "@display-name=TestUser;id=2362364236234634634;room-id=31462363463;sent-ts=1488375811149;admin=0;testp= :testuser!testuser@testuser.my.irc.server PRIVMSG #test :Hello! World"
}

Motivation

I could not find a parser for PHP with message tags support so I made one., (*6)

Installation

composer require skycube/lightircparser

License

GPL-3.0, (*7)

The Versions

27/11 2017

dev-master

9999999-dev

PHP parser for messages conforming to the IRC protocol including support for IRCv3.2 Message Tags

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.3

 

by Graeme Dyas

27/11 2017

1.0.3

1.0.3.0

PHP parser for messages conforming to the IRC protocol including support for IRCv3.2 Message Tags

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.3

 

by Graeme Dyas

03/03 2017

1.0.2

1.0.2.0

PHP parser for messages conforming to the IRC protocol including support for IRCv3.2 Message Tags

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.3

 

by Graeme Dyas

02/03 2017

1.0.1

1.0.1.0

PHP parser for messages conforming to the IRC protocol including support for IRCv3.2 Message Tags

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.3

 

by Graeme Dyas