monitor file activity
+ Reply to Thread
Results 1 to 12 of 12

Thread: im interested..

  1. #1
    Join Date
    Nov 2007
    Posts
    13

    im interested..

    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.

  2. #2
    Join Date
    Sep 2006
    Posts
    1,649
    The easiest languages are web based languages. Go to this site:

    [url]http://www.w*schools.com/[/url]

    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:
    [url]http://wholok.com/irc/#whatis[/url]

    Also, some Perl IRC bot source code downloads:
    [url]http://jk0.org/projects/perl-irc-bot/[/url]
    [url]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[/url]

    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?
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  3. #3
    Join Date
    Nov 2007
    Posts
    13
    thanks for the info :]


    i use mIRC and i have a private bot that i script on.
    a couple of my scripts:
    Code:
    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.
      }
    }

    Code:
    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.
    }

  4. #4
    Join Date
    Sep 2006
    Posts
    1,649
    /me doesn't have mIRC, so I don't know about all this scripting stuff

    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
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  5. #5
    Join Date
    Nov 2007
    Posts
    13
    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:
    Code:
    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:
    Code:
    <?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.
    Last edited by Gridlock; 11-18-2007 at 09:52 AM.

  6. #6
    Join Date
    Sep 2006
    Posts
    1,649
    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.
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  7. #7
    Join Date
    Sep 2006
    Posts
    1,649
    Quote Originally Posted by Gridlock View Post
    now with PHP it seems a little more simple to produce this text as there isnt any trigger. so it would be something like:
    Code:
    <?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]<?php

    $txt = "Hello Gridlock!";
    echo $txt;

    ?>[/PHP]
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  8. #8
    Join Date
    Nov 2007
    Posts
    13
    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.

  9. #9
    Join Date
    Sep 2006
    Posts
    1,649
    You just wait till you get to includes and object-oriented programming, it's uber cool
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  10. #10
    Join Date
    Sep 2005
    Posts
    2,050
    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.
    Who needs drugs when you have electrons?

  11. #11
    Join Date
    Sep 2006
    Posts
    1,649
    What's the difference in print() and echo? Is one more faster or something?
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  12. #12
    Join Date
    Sep 2005
    Posts
    2,050
    Quote Originally Posted by Moonbat View Post
    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.
    Who needs drugs when you have electrons?

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts