]>
Commit | Line | Data |
---|---|---|
1 | /* example usage: | |
2 | * | |
3 | * var qwebirc = new QWebIRC(document.getElementById("myiframeid")); | |
4 | * function f() { | |
5 | * qwebirc.say("hi there mr wibbles"); | |
6 | * } | |
7 | */ | |
8 | ||
9 | var QWebIRC = function(element) { | |
10 | var counter = 0; | |
11 | var send = function(message) { | |
12 | element.src = element.src.split("#")[0] + "#qwmsg:" + counter++ + ":" + message.length + ":" + encodeURIComponent(message); | |
13 | }; | |
14 | ||
15 | this.say = function(message) { | |
16 | send("CMD SAY " + message); | |
17 | }; | |
18 | }; | |
19 |