Find the answer to your Linux question:
Results 1 to 5 of 5
We need for one a lart program, but as a basis we should make a liblart, so sysadmins can make custom LART apps. Like this one, I call it badboy, ...
  1. #1
    Linux User Stefann's Avatar
    Join Date
    Nov 2004
    Location
    Boise, ID
    Posts
    340

    all about LART's

    We need for one a lart program, but as a basis we should make a liblart, so sysadmins can make custom LART apps. Like this one, I call it badboy, a LART automation tool for those asking homework questions on the forums, souce included
    Code:
    #include <iostream>
    #include <lart.h>
    #include <fstream>
    
    int main&#40;char *argv&#91;&#93;&#41;
    &#40;
        if &#40;argv&#91;1&#93; == "warn"&#41;
        &#40;
            ofstream warn;
            string path == "/home/" + argv&#91;2&#93; + "/warning";
            warn.open&#40;path&#41;;
            warn << "THIS IS A WARNING\n";
            warn << "STOP CHEATING ON SCHOOL WORK!\n";
            warn << "FAILURE TO COMPLY WILL EARN YOU A LART\n";
            warn << "YOU HAVE BEEN WARNED\n";
            warn.close&#40;&#41;;
            cout << argv&#91;2&#93; << " has been warned.\n";
            cout << "use&#58; badboy lart " << argv&#91;2&#93; << ", to LART the user\n";
        &#41;
        if &#40;argv&#91;1&#93; == "lart"&#41;
        &#40;
            cout << "LARTING " << argv&#91;2&#93; << " PLEASE WAIT...\n";
            lart&#40;argv&#91;2&#93;&#41;;
            cout << "LART COMPLETE, MAYBE NOW " << argv&#91;2&#93; << " WILL LEARN A LESSON\n";
        &#41;
        if &#40;argv&#91;1&#93; == ""&#41;
        &#40;
            cout << "Use badboy -h for help\n";
        &#41;
        if &#40;argv&#91;1&#93; == "-h"
        &#40;
            cout << "BADBOY - LART AUTOMATION TOOL\n";
            cout << "badboy warn &#91;user&#93; - scold user with warning letter\n";
            cout << "badboy lart &#91;user&#93; - LART a user\n";
        &#41;
        return 0;
    &#41;
    Hehe, call me crazy, hmm, maybe I should add a few options included in the description of man lart, or at least read them from a config file.
    Nothing is worse than ten penguins fighting over which is better, vi or emacs.
    Registered Linux User #404402
    Finally I'm back on LF after a long while.

  2. #2
    Linux Engineer
    Join Date
    Jan 2005
    Location
    Chicago (USA)
    Posts
    1,028
    Luser Attitude Readjustment Tool?

  3. #3
    Linux User Stefann's Avatar
    Join Date
    Nov 2004
    Location
    Boise, ID
    Posts
    340
    Quote Originally Posted by a thing
    Luser Attitude Readjustment Tool?
    yup
    Nothing is worse than ten penguins fighting over which is better, vi or emacs.
    Registered Linux User #404402
    Finally I'm back on LF after a long while.

  4. #4
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    Quote Originally Posted by Stefann
    Quote Originally Posted by a thing
    Luser Attitude Readjustment Tool?
    yup
    Sounds neat! But some short sleep's between the text pieces would be cool too :P

  5. #5
    Linux User Stefann's Avatar
    Join Date
    Nov 2004
    Location
    Boise, ID
    Posts
    340
    Quote Originally Posted by jaboua
    Quote Originally Posted by Stefann
    Quote Originally Posted by a thing
    Luser Attitude Readjustment Tool?
    yup
    Sounds neat! But some short sleep's between the text pieces would be cool too :P
    Eh? of like use a sleep(5); line to pause the output, maybe a good idea, but currently the code is just a joke I made for those asking homework questions so it doesn't really matter.
    Nothing is worse than ten penguins fighting over which is better, vi or emacs.
    Registered Linux User #404402
    Finally I'm back on LF after a long while.

Posting Permissions

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