Programming 8

Put your programming skills to the test in these challenges.

Programming 8

Post by Jimmy_xor on Fri Apr 25, 2008 2:04 pm
([msg=1313]see Programming 8[/msg])

It says "notice moo with !perm8", but moo doesn't respond. I've tried a lot of things, but none works:
PRIVMSG moo :!perm8
PRIVMSG #perm8 :!perm8
And it doesn't work with a non-bot either:
!perm8
/msg moo !perm8

Am I doing something wrong or have moo died?
Jimmy_xor
New User
New User
 
Posts: 22
Joined: Tue Apr 22, 2008 4:35 pm
Blog: View Blog (0)


Re: Programming 8

Post by TheMindRapist on Fri Apr 25, 2008 2:11 pm
([msg=1314]see Re: Programming 8[/msg])

In #Bots
/notice moo !perm8
I'm working on this one also.
Image
User avatar
TheMindRapist
Contributor
Contributor
 
Posts: 585
Joined: Mon Apr 14, 2008 4:57 pm
Blog: View Blog (0)


Re: Programming 8

Post by -The-Pr0xz- on Sun Apr 27, 2008 7:13 am
([msg=1498]see Re: Programming 8[/msg])

Jimmy_xor wrote:It says "notice moo with !perm8", but moo doesn't respond. I've tried a lot of things, but none works:
PRIVMSG moo :!perm8
PRIVMSG #perm8 :!perm8
And it doesn't work with a non-bot either:
!perm8
/msg moo !perm8

Am I doing something wrong or have moo died?


There is another command called NOTICE which is kind of the same as PRIVMSG.
So basicly NOTICE moo :!perm8 will work just fine :)
-The-Pr0xz-
New User
New User
 
Posts: 2
Joined: Sun Apr 27, 2008 7:04 am
Blog: View Blog (0)


Re: Programming 8

Post by Jimmy_xor on Sun Apr 27, 2008 12:21 pm
([msg=1516]see Re: Programming 8[/msg])

I know.. I have already completed the mission
Jimmy_xor
New User
New User
 
Posts: 22
Joined: Tue Apr 22, 2008 4:35 pm
Blog: View Blog (0)


Re: Programming 8

Post by TheMindRapist on Mon Apr 28, 2008 11:38 am
([msg=1617]see Re: Programming 8[/msg])

Heh, you were asking about it, don't get mad.
I finished also.
:)
Image
User avatar
TheMindRapist
Contributor
Contributor
 
Posts: 585
Joined: Mon Apr 14, 2008 4:57 pm
Blog: View Blog (0)


Re: Programming 8

Post by birinight on Sat Nov 01, 2008 5:37 pm
([msg=14354]see Re: Programming 8[/msg])

Hi!
This is my first time asking for help here but I'm completly stuck.

Code: Select all
moo: Permanent Programming mission 8 started

moo: !md5 Q&ZOAihT 86Owx\

Sent !perm8-result 54712586f6cf5cd64e02cc9441e2141a to moo! Waiting for answer

received CTCP request from moo

Sent to moo: Birinight Bot - Ver 0.7


When I sent the version to Moo I didn't get the response. moo is suppose to send me "!perm8-attack" so I can join #takeoverz, but I never get the response.

I've tried to sent my response by both 'notice' and 'ctcp_reply'.

Thanks in advance.
birinight
New User
New User
 
Posts: 10
Joined: Tue Oct 28, 2008 5:00 pm
Blog: View Blog (0)


Re: Programming 8

Post by mgscrk on Sat Nov 01, 2008 8:37 pm
([msg=14359]see Re: Programming 8[/msg])

Are you sure you send the version the right way? I think you should double check on it. NOTICE has to work.
User avatar
mgscrk
New User
New User
 
Posts: 7
Joined: Tue Sep 02, 2008 5:47 pm
Blog: View Blog (0)


Re: Programming 8

Post by birinight on Sat Nov 01, 2008 9:12 pm
([msg=14363]see Re: Programming 8[/msg])

I'm sure notice is working. I've done all other requests by 'notice'.

I've received the client info request as a cversion event, so it's logical to respond by a ctcp_reply message.
Either way I've tried to respond by both notice and cctcp_reply.

I've programed the bot in perl with NET::Irc. Here is a sample:

Code: Select all
sub on_version {
...
   my $version_info = "Birinight Bot - 0.7";
   $conn->notice($nick, $version_info);
...
}


also tried:

Code: Select all
sub on_version {
...
   my $version_info = "Birinight Bot - 0.7";
   $conn->ctcp_reply($nick, $version_info);
...
}


where:
Code: Select all
$conn->add_handler('cversion', \&on_version);
birinight
New User
New User
 
Posts: 10
Joined: Tue Oct 28, 2008 5:00 pm
Blog: View Blog (0)


Re: Programming 8

Post by Drone022 on Sun Nov 02, 2008 12:12 am
([msg=14368]see Re: Programming 8[/msg])

Hey, I think your problem is that your responding to the version request incorrectly.

Heres the IRC ctcp protocol:

http://www.irchelp.org/irchelp/rfc/ctcpspec.html

The important bit:

VERSION
=======
This is used to get information about the name of the other client and
the version of it. The request in a "privmsg" is simply

\001VERSION\001

and the reply

\001VERSION #:#:#\001

where the first # denotes the name of the client, the second # denotes
the version of the client, the third # the enviroment the client is
running in.

Using

X-N-CLN ::= '\000' .. '\071' | '\073' .. '\377'

the client name is a string of type X-N-CLN saying things like "Kiwi"
or "ircII", the version saying things like "5.2" or "2.1.5c", the
enviroment saying things like "GNU Emacs 18.57.19 under SunOS 4.1.1 on
Sun SLC" or "Compiled with gcc -ansi under Ultrix 4.0 on VAX-11/730".


If you respond correctly with a notice to moo it should work fine e.g.

Code: Select all
send_notice("moo", "\001VERSION Testbot:0.1:Windoze\001");


Thats not perl code but you get the picture, just change your $version_info.
Drone022
New User
New User
 
Posts: 4
Joined: Sat Aug 16, 2008 5:30 am
Blog: View Blog (0)


Re: Programming 8

Post by birinight on Sun Nov 02, 2008 10:54 am
([msg=14387]see Re: Programming 8[/msg])

Thanks man. That was it.
birinight
New User
New User
 
Posts: 10
Joined: Tue Oct 28, 2008 5:00 pm
Blog: View Blog (0)


Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests