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 - Munchor

Pages: 1 ... 112 113 [114] 115 116 ... 424
1696
User is fine. It includes members and guests. An user is really a site visitor, which includes both (and bots).

I am sort of confused by having Users as both members and guests. But ok :)

1697
TI Z80 / Re: TI-Gnome
« on: May 08, 2011, 06:00:49 am »


You just embarrassed my GUI Library.
* Scout claps.

Nice job SirCmpwn, I look forward to using this.

1698
Graviter / Re: Graviter - Axe
« on: May 08, 2011, 04:37:40 am »
leafiness, that screenshot is 1337, really awesome, nice job!

1699
[FR] Hors-Sujet / Re: Console Fighters
« on: May 07, 2011, 05:09:19 pm »
Bonjour à tous :) ,

J'apprends le C++ depuis pas longtemps et j'ai fait un petit jeu. Il se nomme Console Fighters et comme son nom l'indique, c'est un jeu de baston mais sans graphiques car je suis pour l'instant limité à la console. <_<
Bon ce n'est qu'une première version, j'aimerais vos avis sur ce programme!

Enjoy!

Si vous avais utilisé C++, porquoi seuleument pour Windows?

1700
The Axe Parser Project / Re: Features Wishlist
« on: May 07, 2011, 04:41:39 pm »
I just saw the poll, I think parentheses are very important since all programming languages enforce them (TI-Basic not included). As long as Axe redirects us to the error if we press PRGM.

I'd really really like this implemented :D

1701
there's still a bug, it says 'Users online' and what it leads to is 78 (atm) which is the guests (50) + users (28). So it should say 'Online People' or something.

1702
Isn't the record 1873? ???

Also Users online is the current total of users in the past 30 minutes, as on the front page. It includes guests and members.

yeah I meant just users.

1703
@Darl181, even in most extreme conditions, I think triple post should be avoided.

1704
I just checked the stats to try and find out what the record of most online users is and I think I found it, it's 78.

However, it is listed under "Users Online:", shouldn't it be, "Maximum Users Online" or something like that?

1705
Miscellaneous / What the Finns need to know about Portugal
« on: May 07, 2011, 12:17:34 pm »
I found this awesome video following a campaign organized by a political party in Finland criticizing Portugal, so I thought I should post this to shut Finn's mouth.


1706
Computer Programming / Re: IRC Score Bot
« on: May 07, 2011, 10:40:41 am »
Oh my, I should have mentioned this is not online in omnimaga's channel (#omnimaga). I have not asked permission for that and I have no idea how it would account for user messages in the forums (there is already a website rating for that).

1707
Other Calculators / Re: Can I do anything with my TI-30XIIS?
« on: May 07, 2011, 09:29:56 am »
Oooh I get it, thanks :)

1708
Other Calculators / Re: Can I do anything with my TI-30XIIS?
« on: May 07, 2011, 09:25:51 am »
@aeTIos: Sorry, I still do not get it :(

1709
Other Calculators / Re: Can I do anything with my TI-30XIIS?
« on: May 07, 2011, 09:22:08 am »
The lower part of the screen has 7 segment-like display, so yeah, I dont think you can program this thing. I used to have this one but it got stolen last year.

What do you mean with that?

1710
Computer Programming / IRC Score Bot
« on: May 07, 2011, 08:57:50 am »
I made a score bot for IRC:

Code: [Select]
#!/usr/bin/env python

import datetime
import hashlib
import os
import random
import sys
import time
import urllib

from twisted.words.protocols import irc
from twisted.internet import protocol
from twisted.internet import reactor

class MyBot(irc.IRCClient):

    def _get_nickname(self):
        return self.factory.nickname

    nickname = property(_get_nickname)

    def signedOn(self):
        self.join(self.factory.channel)

    def joined(self, channel):
        print "*** Joined %s" % channel
        self.myDict = {}

    def privmsg(self, user, channel, msg):
        user = user.split('!')[0]
        if msg[len(msg)-2:] == "++":
            if msg.split('++')[0] == user:
                self.msg(channel,"You can't plus yourself")
                return

            try:
                self.myDict[msg.split('++')[0]] += 1
                print "+1 for %s" % user
                return
            except KeyError:
                self.myDict[msg.split('++')[0]] = 1
                print "The first +1 for %s" % user
                return

        if msg[len(msg)-2:] == "--":
            try:
                self.myDict[msg.split('--')[0]] = self.myDict[msg.split('--')[0]] - 1
                print "-1 for "+user
                return
            except:
                self.myDict[msg.split('--')[0]] = -1
                print "The first -1 for %s" % user
                return

        if msg.split()[0] == '!score':
            try:
                msgToDisplay = msg.split()[1] + ": " + str(self.myDict[msg.split()[1]])
                self.msg(channel,msgToDisplay)
                print "I answered to %s: %s" % (user,msgToDisplay)
                return
            except KeyError:
                self.msg(channel,"Non-existing member: %s" % msg.split()[1])
                print "Non-existing member: %s" % msg.split()[1]

class MyBotFactory(protocol.ClientFactory):
    protocol = MyBot

    def __init__(self, channel, nickname='scoreBot'):
        self.channel = channel
        self.nickname = nickname

    def clientConnectionLost(self, connector, reason):
        print "Lost connection (%s), reconnecting." % (reason,)
        connector.connect()

    def clientConnectionFailed(self, connector, reason):
        print "Could not connect: %s" % (reason,)

def main():
    network = 'irc.freenode.net'
    reactor.connectTCP(network, 6667, MyBotFactory('#python-forum'))
    reactor.run()

if __name__ == "__main__":
    main()

If you say stuff like:

Code: [Select]
netham45++

It will set netham45's score to what it was +1.

You can also do netham45--.

If you say !score netham45 it will say in a public message netham45's score.

It also won't let you ++ yourself.

The code is quite clean, but for variables' names. There is not a linking function yet (to link usernames). What do you think?

Pages: 1 ... 112 113 [114] 115 116 ... 424