.PY - Wrote a !help script, it works but not for others

Discussion about Perl, TCL or Python scripts and C/C++ plugins (using and writing them).

.PY - Wrote a !help

Postby mushwars » 15 Dec 2009 00:20

http://codepad.org/VTLG15xA

That is my code. here is what is happening:

>ar< !google <STRING> ~ !time (CST only) ~ !define <TERM> (google define)
>ar< !calc <SIMPLE EXPRESSION> ~ !weather <ZIPCODE> ~ !tvrage <TV SHOW> (includes anime)
Usage: MSG <nick> <message>, sends a private message
Usage: MSG <nick> <message>, sends a private message
<ar> !help


And ar recieves nothing. But when I do it, it works... here is what happens:

>mushwars< !google <STRING> ~ !time (CST only) ~ !define <TERM> (google define)
>mushwars< !calc <SIMPLE EXPRESSION> ~ !weather <ZIPCODE> ~ !tvrage <TV SHOW> (includes anime)
<mushwars> !help
-mushwars- !google <STRING> ~ !time (CST only) ~ !define <TERM> (google define)
-mushwars- !calc <SIMPLE EXPRESSION> ~ !weather <ZIPCODE> ~ !tvrage <TV SHOW> (includes anime)



I am new to python. I am however a php web developer, so coding is not new to me.
Image
mushwars
 
Posts: 1
Joined: 15 Dec 2009 00:09

Postby Khisanth » 15 Dec 2009 19:59

Both the code and the output looks correct already.

>ar< !google <STRING> ~ !time (CST only) ~ !define <TERM> (google define)
>ar< !calc <SIMPLE EXPRESSION> ~ !weather <ZIPCODE> ~ !tvrage <TV SHOW> (includes anime)
<ar> !help


shows that you are sending the message, there are ways to fix the way it is displayed locally but it already looks normal for other people

The reason it looks that is because the event that triggered your callback won't get printed util all the callbacks for it are done. This is mostly because the callbacks might return EAT_ALL or EAT_XCHAT in which case it shouldn't display the event at all
Khisanth
 
Posts: 1559
Joined: 10 Jun 2004 05:23


Return to Scripts and Plugins

Who is online

Users browsing this forum: No registered users and 1 guest