Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - alberthrocks

Pages: 1 ... 26 27 [28] 29 30 ... 55
406
Computer Programming / Re: urllib is not being nice :(
« on: October 16, 2011, 10:06:03 pm »
That is how you are supposed to intercept outgoing messages...  See the filters() function.  that does ALMOST the same thing.

edit: Somehow it was in my last two lines.  I switched the order of them (so the filter got hooked first, then the greenText) and it works... Idk why...
I think I might know why... again, this is all theory, but I have an idea now: since you have the same first argument, the 2nd line will replace the hook established in the first. To prove it, add a print statement to the filters function, and if I'm right, you won't see that get printed at all! ;)

Assuming I'm right about the issue... it seems that you're simply playing around with the code, since I found your code snipplet online, which is probably a plugin example. However, in the future, if you are going to parse like this (with two functions), you should either:
1) Merge the two functions into one; or
2) If you prefer having two functions handing the hook, call the 2nd function from the first. That is...
Code: [Select]
__module_name__ = "IrmageBoard"
__module_version__ = "0.2.0"
__module_description__ = "Liek a real imageboard guies (without the images!!!1)"

import xchat, string, re, random, yaml
from urllib import urlopen

global myFilter
ymlFilter = urlopen("http://xvicario.us/irmageboard/filters.yml")
myFilter = yaml.load(ymlFilter)
ymlFilter.close()

print "\0034",__module_name__, __module_version__, "has been loaded\003"

def greenText(word, word_eol, userdata):
    print "EXECUTING greenText()"
    if word_eol[0].find('>'):
        return xchat.EAT_NONE
        print "FOUND NOTHING!"
    else:
        xchat.command(" ".join(["msg", xchat.get_info("channel"), ''.join(["3",word_eol[0]])]))
        print "FOUND SOMETIHNG!"
    return xchat.EAT_ALL

def filters(word, word_eol, userdata):
    newString = word_eol[0]
    for k, v in myFilter.iteritems():
        if k in newString:
            tempColor = random.randrange(0,16,1)
            tempBack = random.randrange(0,16,1)
            tempReplace = re.compile(k, re.IGNORECASE)
            newString = tempReplace.sub(v, newString)
            newString = "".join(["\003",str(tempColor),",",str(tempBack),newString,"\003"])
    xchat.command(" ".join(["msg", xchat.get_info("channel"), newString]))
    greenText(word, word_eol, userdata) # Call that 2nd function!
    return xchat.EAT_ALL # May not be necessary, since the greenText function also returns this too... although...
    # Maybe I'm a bit wrong in how it returns. If the 2nd function doesn't kick out of the plugin, simply do
    # ret = greenText(word, word_eol, userdata)
    # return ret

xchat.hook_command("", filters)
Be sure to read my included code comments for more info.

Have fun learning how to write XChat plugins! :D (They're really, really fun when they work! :))

407
Computer Programming / Re: urllib is not being nice :(
« on: October 16, 2011, 08:42:20 pm »
It does the same thing :(

edit: you can actually see my debugging code :P "EXECUTING greenText()" etc lol that stuff never shows up, so i can safely say it doesn't execute. I also disabled the urlopen and the code then worked...
I'm assuming that you know that any print output is redirected to XChat's window, right?
(I haven't tested this, sorry! :()

EDIT: Oh wait, I think you're doing it wrong... :P
xchat.hook_command("", greenText) may not work because the initial argument is blank. I don't know how XChat2 responds to this though... but I would suggest trying other hooks too, found here: http://xchat.org/docs/xchatpython.html#head-36ddb85a7e96550366a7165d2aed583da9ea01f5

This is, of course, if you weren't looking at the XChat window and all the output was there. ;)

408
News / Re: The Launch of a new website : TI-Planet
« on: October 16, 2011, 08:38:42 pm »
And there's an interesting TI-Planet app on the Apple App store too! O_O (I'm too lazy to link to it though... :P)

409
Graviter / Re: Graviter
« on: October 15, 2011, 06:35:55 pm »
I like it! :D However, I still like to keep that text flickering effect (light sign?) for the title screen... maybe both? :D

410
News / Re: Webchat now available in the navigation bar
« on: October 15, 2011, 06:33:25 pm »
Also the webchat moved to http://57o9.org:3989/, the http://webchat.omnimaga.org/ URL is also supposed to work as soon as the DNS refreshes. Now with NickServ authentication! (That was one reason why we moved the webchat to my server, the other being that withg.us.to died.)
Arrgggh... my VPS provider really, really does not know how to keep my server alive :P I'll have to move it someday when I get time.

+1 to Juju for the move - it would be more stable on your server than mine... at least for now. ;)

411
News / Re: Webchat now available in the navigation bar
« on: October 12, 2011, 11:23:15 pm »
Hm, withg is blocked here so this doesn't work, and neither does omnom b/c http omni is blocked x.x

Works great at home tho ;D

I suspect that your school district is doing a domain name block - not my subdomain, but the main one (*.us.to), like how my school blocks all *.tk websites. (I'm lucky my school hasn't discovered FreeDNS yet... :P) It's unlikely that they've blocked my IP though... If they did, that's not fair! :P

A remedy to this is to buy a domain name, which I am planning to do. :) Unfortunately, the domain I want is being held by a domain name troll... :P

412
News / Re: Webchat now available in the navigation bar
« on: October 11, 2011, 12:14:40 pm »
(which will fill your username in for you and is integrated in the website)
You might want to check for cross-browser compatibility, because this feature doesn't work in Opera. Instead it just gives a weird nick with random chars. Otherwise that seems nice.
I've did some independent tests myself at school (PortableApps ftw), and found no such issues. (I rarely use Opera, btw, so this was the first time it was exposed to the WebIRC. :P)
See the images below:
http://dl.dropbox.com/u/1016340/PublicPictures/WebIRCOpera/WebIRCOperaLogin.PNG
http://dl.dropbox.com/u/1016340/PublicPictures/WebIRCOpera/WebIRCOperaInsideIRC.PNG
http://dl.dropbox.com/u/1016340/PublicPictures/WebIRCOpera/WebIRCOperaVersion.PNG

The version I used was 11.51, which seems to be the latest. I would suggest clearing your cache (and possibly cookies), then trying again. Hopefully it'll work this time :)

(And yes, that is CSI work you're seeing. Ironic, eh? :P)

413
ASM / Re: Linux - assembler for TI-83+
« on: October 11, 2011, 11:47:54 am »
I've been having issues with spasm as well on linux. Buckeye said he was going to look into it but he never got around to it yet.
That version is an old one so you might want to try building from the source. If that doesn't work ( probably wont even build ) then this one you have, it will be able to build the hex files, but not compile them into 8xp's so you need to figure out a way to convert them to an 8xp.

( The reason it's not working is because of some bad code with the exporter when it comes to naming on Linux )

EDIT: just tested the latest svn, it's seg faulting on the first pass, so just stick with what you have for now.
Heh, I might have a build... but my Linux USB HDD crashed... really hard... recently, so I'm not too sure if I can fetch it out.

414
News / Re: OmnomIRC Downtime
« on: October 08, 2011, 09:24:34 pm »
I've created a little web IRC here:
http://withg.us.to:3989/

This connects to the OmniNET network, and by default will connect to the #omnimaga and the little support channel for this web IRC, #irpwebirc.

If you can't connect due to outward access blocking, don't worry - we're working on that. :)
Please don't abuse!

415
Miscellaneous / Re: !!! IMPORTANT !!! HELP !!!!!!
« on: October 07, 2011, 10:44:25 pm »
sorry for double posting but here:

[redacted image]
This shouldn't be the end of the world. You need to contact Steam immediately (or rather, your friend) to fix the issue:
https://support.steampowered.com/kb_article.php?ref=2347-QDFN-4366

Trolls-- :/

416
Mint and Windows side by side is always possible! :) For the bootloader, you can either opt to use Grub or ntldr. (The former will need a bit more work.)

I've even used Mint on a USB HDD! :D (Although it has died recently, and I'm trying to back up stuff... :P)

417
News / Re: OmnomIRC Downtime
« on: October 06, 2011, 07:09:53 pm »
I can set up a web IRC client on my server. It also works pretty darn well too, since my server is also part of OmniNET. :D

Currently, there's some serious downtime due to my VPS provider having some rather serious storage issues. See email below:
Quote
Thursday October 6th 2011
=========================


There is a critical outage for some VMware users in Chicago, IL. This outage is only affecting users
that are in a particular storage group that is across a set of drives in the same storage subsystem.

To correctly resolve this issue it will require a possible extended downtime for these customers this
afternoon.

There had been a plan in place to make upgrades to this storage system this month however, this
event will force this upgrade now.

* There will not be any data loss!
* Please be prepared for a possible multi hour outage for some customers.


eNetSouth Support
[email protected]

Once it's back up, I'll install the web IRC client (or hire one of my server admins to do it). ;)

EDIT: Fixed tags

418
Miscellaneous / Re: The Leader Who Created Apple...
« on: October 05, 2011, 10:11:31 pm »
I'll simply take my 2 Facebook statuses about him and place them here: (combined)

Steve Jobs revealed his newest innovation: iDied. :P On a more serious note... even though I still hate you, Apple, I can't help but admire the spirit of your CEO, Steve Jobs, whose I would unhesistantly agree is unmatched by any other leader, and is still a peak to strive for. I hate your products, but I love your fervor for your company. RIP Steve Jobs, 1955-2011. :'(

419
TI Z80 / Re: zStart - an app that runs on ram clears
« on: October 02, 2011, 06:01:11 pm »
Oooh, how about you write a mini safe RAM clear program that I and Freyaday can hook to [ON]+[num]? :D
I think that would be the best solution! ;)

EDIT: Programs, since one would archive and crash the calc, while another would unarchive the previously unarchived files. While we're at it, could you backup appvars, OS vars, and possibly hooks too? (OK, maybe not hooks :P)

420
TI Z80 / Re: zStart - an app that runs on ram clears
« on: October 02, 2011, 05:57:35 pm »
I used safe RAM clears too! Like when a program messed something up, and I didn't want to lose data while resetting the RAM.

Pages: 1 ... 26 27 [28] 29 30 ... 55