kunt

golang IRC bot
git clone git://git.2f30.org/kunt
Log | Files | Refs | LICENSE

commit fdac0f1b158a76490f1de5ac7d354c51c7d0236b
parent 45e8974d485327efbfd74fe7d61459a55585c99c
Author: sin <sin@2f30.org>
Date:   Wed,  5 Jun 2013 17:03:04 +0100

use runtime.Gosched() - ugly hack

Diffstat:
Msrc/irc/message.go | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/irc/message.go b/src/irc/message.go @@ -6,6 +6,7 @@ package irc import ( "fmt" + "runtime" "strings" ) @@ -25,6 +26,8 @@ func (i *Context) Pong(host string) { Args: []string{":" + host}, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Pass() { @@ -33,6 +36,8 @@ func (i *Context) Pass() { Args: []string{i.network.pass}, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Nick() { @@ -41,6 +46,8 @@ func (i *Context) Nick() { Args: []string{i.network.nick}, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) User() { @@ -53,6 +60,8 @@ func (i *Context) User() { }, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Join(channel string, key string) { @@ -61,6 +70,8 @@ func (i *Context) Join(channel string, key string) { Args: []string{channel, key}, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Part(channel string, text string) { @@ -72,6 +83,8 @@ func (i *Context) Part(channel string, text string) { }, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Quit(text string) { @@ -80,6 +93,8 @@ func (i *Context) Quit(text string) { Args: []string{":" + text}, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Privmsg(channel string, text string) { @@ -91,6 +106,8 @@ func (i *Context) Privmsg(channel string, text string) { }, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Notice(nick string, text string) { @@ -102,6 +119,8 @@ func (i *Context) Notice(nick string, text string) { }, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) Topic(channel string, text string) { @@ -113,6 +132,8 @@ func (i *Context) Topic(channel string, text string) { }, } i.outgoingMsg <- msg + // Pff... + runtime.Gosched() } func (i *Context) ParseRawMessage(raw string) (*Message, error) {