View Full Version : im interested..
Gridlock
11-17-2007, 02:06 PM
in learning different "Languages"
i know how to script on IRC clients, and know basic HTML although its been a couple years since i tried HTML...
what would i want to move onto next?
starting with the easier ones of course. i don't like the idea of jumping into something i cant handle at this point in time, but with help i can pick things up within a few months.
Moonbat
11-17-2007, 05:02 PM
The easiest languages are web based languages. Go to this site:
http://www.w*schools.com/
Look up HTML first. It's not much of a programming language (actually it's a markup language) but if you are totally new to programming, this will help you a bit.
After that, on that same site, look up PHP. This is your first programming language. This is more procedural programming (don't worry about OOP and procedural programming differences just yet) and is easy to learn.
Now is the time to pick a specific language, this language should be based on what you want to do. Since you want to create IRC bots, try a language called Perl. It's also mostly procedural programming, but it's a very powerful language. Just Google up the words 'perl tutorial' and pick whichever suits you. Except for W*Schools, I don't usually recommend specific tutorials, because some people may learn better from one tutorial out there then all the rest.
I found a nice resource on IRC bots using Perl:
http://wholok.com/irc/#whatis
Also, some Perl IRC bot source code downloads:
http://jk0.org/projects/perl-irc-bot/
http://20*.85.*65.*04/search?q=cache:tF7QcUQdtZ0J:www.governmentsecurity.org/forum/index.php&#*7;*Fshowtopic%*D*70*2+IRC+bot+in+perl&hl=en&ct=clnk&cd=4&gl=us
I know this is a lot of stuff all at once, but the more you know now, the less you'll have to catch up on later.
P.S. - What do you mean by 'scripting' on IRC clients?
Gridlock
11-17-2007, 06:12 PM
thanks for the info :]
i use mIRC and i have a private bot that i script on.
a couple of my scripts:
on *:text:!av *:#:{
if ($nick isop $chan) {
cs access $chan add $2 *
msg $chan 4[7Access4] $2 7has been given4 * 7access in4 $chan $+ .
mode $chan +v $2
}
}
on *:text:!ah *:#:{
if ($nick isop $chan) {
cs access $chan add $2 4
msg $chan 4[7Access4] $2 7has been given4 4 7access in4 $chan $+ .
mode $chan +h $2
}
}
on *:text:!ao *:#:{
if ($nick isop $chan) {
cs access $chan add $2 5
msg $chan 4[7Access4] $2 7has been given4 5 7access in4 $chan $+ .
mode $chan +o $2
}
}
on *:text:!aao *:#:{
if ($address($nick,2) == *!*@*****-***56B8*.nott.cable.ntl.com) {
cs access $chan add $2 *0
msg $chan 4[7Access4] $2 7has been given4 *0 7access in4 $chan $+ .
mode $chan +ao $2 $2
}
}
on *:text:!leet *:#:{
if ($address($nick,2) == *!*@*****-***56B8*.nott.cable.ntl.com) {
cs access $chan add $2 ***7
msg $chan 4[7Access4] $2 7has been given4 ***7 7access in4 $chan $+ .
mode $chan +ao $2 $2
}
}
on *:text:!admin *:#:{
if ($address($nick,2) == *!*@*****-***56B8*.nott.cable.ntl.com) {
cs access $chan add $2 ****
msg $chan 4[7Access4] $2 7has been given4 **** 7access in4 $chan $+ .
mode $chan +ao $2 $2
}
}
on *:text:!delacc *:#:{
if ($address($nick,2) == *!*@*****-***56B8*.nott.cable.ntl.com) {
cs access $chan del $2
msg $chan 4[7Access4] $2 7has been deleted from 4 $chan $+ 's 7access list.
}
}
alias access {
dialog -m access access
}
menu * {
access:/dialog -m access access
}
dialog access {
title "Access"
size -* -* *25 *50
option dbu
text "Access List", 6, 5* 4 60 *0 center
text "Channel", *, *0 *6 60 *0 center
text "Nickname", 4, *0 *0 60 *0 center
edit "", 2, *6 ** 56 **
edit "", 7, *6 27 56 **
button "Voice", 8, 46 42 *7 *2
button "Halfop", *, 46 55 *7 *2
button "Op", *0, 46 68 *7 *2
button "Aop", **, 46 8* *7 *2
button "Leet", *2, 46 *4 *7 *2
button "Admin", **, 46 *07 *7 *2
button "Delete", *4, 46 *20 *7 *2
text "By Triv", *, 55 *40 60 *0 center
}
on *:DIALOG:access:sclick:8:{
cs access $did(2) add $did(7) *
msg $did(2) 4[7Access4] $did(7) 7has been given4 * 7access in4 $did(2) $+ .
}
on *:DIALOG:access:sclick:*:{
cs access $did(2) add $did(7) 4
msg $did(2) 4[7Access4] $did(7) 7has been given4 4 7access in4 $did(2) $+ .
}
on *:DIALOG:access:sclick:*0:{
cs access $did(2) add $did(7) 5
msg $did(2) 4[7Access4] $did(7) 7has been given4 5 7access in4 $did(2) $+ .
}
on *:DIALOG:access:sclick:**:{
cs access $did(2) add $did(7) *0
msg $did(2) 4[7Access4] $did(7) 7has been given4 *0 7access in4 $did(2) $+ .
}
on *:DIALOG:access:sclick:*2:{
cs access $did(2) add $did(7) ***7
msg $did(2) 4[7Access4] $did(7) 7has been given4 ***7 7access in4 $did(2) $+ .
}
on *:DIALOG:access:sclick:**:{
cs access $did(2) add $did(7) ****
msg $did(2) 4[7Access4] $did(7) 7has been given4 **** 7access in4 $did(2) $+ .
}
on *:DIALOG:access:sclick:*4:{
cs access $did(2) del $did(7)
msg $did(2) 4[7Access4] $did(7) 7has been deleted from 4 $did(2) $+ 's 7access list.
}
Moonbat
11-17-2007, 06:36 PM
/me doesn't have mIRC, so I don't know about all this scripting stuff :p
Anyways, you're welcome. If you need me to elaborate more on anything I said, feel free to send me a PM or post it here
Gridlock
11-18-2007, 09:14 AM
i looked into the PHP one, it said download PHP so i did, but when i try to install it, it says "This installation package could not be opened. Contact the application vendor to verify that it is a valid Windows installer package"
i downloaded the Windows version.
any idea whats up? :S
EDIT: okay i got it working, and i made a small php file using the guide, but it wont let me open it because i am missing a hell of a load of .dll files.. looks like im going to have alot of fun with this :P
i have noticed that there are things the same in PHP as there are in IRC code except IRC code uses triggers.
on IRC clients.. this script:
on *:JOIN:#:{
/msg $chan Hello $nick $+ !
}
would message the channel with for example "Hello Gridlock!" if i joined an irc channel,
now with PHP it seems a little more simple to produce this text as there isnt any trigger. so it would be something like:
<?php
$txt = "Hello Gridlock!";
?>
resulting in.. i think.. the text "Hello Gridlock!" being shown.
im not too sure. so correct me if im wrong :P im open to any type of criticism and wont complain if i have to be put right, just a process of trial and error.
Moonbat
11-18-2007, 10:27 AM
W*Schools confuses you into thinking that you need to download PHP. You don't, unless you want to run a local server.
Look at the top of the page in your address bar, you see a .php extension right?
PHP is a web language. You only need a free webhost (I use Awardspace). Webhosts have their own properly configured servers and stuff, and you won't have to make your own.
PHP, in a sense, is just like HTML. The difference is that with HTML you can just write some code on your computer and run it locally, whereas PHP requries you to be running a local webserver. That's why you can just use free webhosts to test PHP.
Moonbat
11-18-2007, 10:31 AM
now with PHP it seems a little more simple to produce this text as there isnt any trigger. so it would be something like:
<?php
$txt = "Hello Gridlock!";
?>
resulting in.. i think.. the text "Hello Gridlock!" being shown.
im not too sure. so correct me if im wrong :P im open to any type of criticism and wont complain if i have to be put right, just a process of trial and error.
That code only makes a string variable with the contents "Hello Gridlock!".
In order to echo (i.e. show) it, you'd have to do this:
<?php
$txt = "Hello Gridlock!";
echo $txt;
?>
Gridlock
11-18-2007, 11:36 AM
ah right.. i haven't learned about echo's yet. although i really should of when i was doing IRC scripts, because it has the same function from what i have read.
php seems like a nice language to learn. :D
Moonbat
11-18-2007, 04:55 PM
You just wait till you get to includes and object-oriented programming, it's uber cool :D
Ezekiel
11-18-2007, 06:07 PM
Yeah, what Moonbat said about $txt just being set as a variable. You have to then use it in whatever way you desire -- using print() to output to the user, fopen() et al to write to file, and so on. There really are infinite possibilities.
Moonbat
11-18-2007, 07:11 PM
What's the difference in print() and echo? Is one more faster or something?
Ezekiel
11-19-2007, 01:37 PM
What's the difference in print() and echo? Is one more faster or something?
I think they're basically synonyms -- do exactly the same thing.
Powered by vBulletin® Version 4.1.8 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.