[go: up one dir, main page]

File: README

package info (click to toggle)
sbnc 1.3.9-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,156 kB
  • ctags: 4,719
  • sloc: ansic: 20,379; cpp: 14,175; sh: 12,783; tcl: 6,025; php: 448; makefile: 430; perl: 46; awk: 25
file content (41 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
shroudBNC PHP scripts
---------------------

These scripts provide a way of communicating with the iface2 component of shroudBNC 1.2 (and newer).

Included files:

-index.php - simple web interface which lists all available commands and allows execution of them
-sbnc.php - SBNC class, used for executing iface2 commands
-itype.php - itype parser/generator, used internally to convert php strings/arrays to itype values
-classbuilder.php - generates wrapper classes for sbnc connections

classbuilder.php
----------------

Usually you would call iface2 functions like this:

$sbnc->Call('setvalue', array('server', 'irc.quakenet.org'));

Using classbuilder.php you can generate wrapper classes, so that you can call iface2 functions like this:

$wrapper->setvalue('server', 'irc.quakenet.org');

Here's an example of how to use classbuilder.php

<?php

include_once('sbnc.php');
include_once('classbuilder.php');

$sbnc = new SBNC(...);

if (!buildSbncClass('MySbncClass', $sbnc)) {
	die();
}

$wrapper = new MySbncClass($sbnc);

print_r($wrapper->getlog(-1, -1));

?>