home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / irc / 4008 < prev    next >
Encoding:
Text File  |  1992-11-09  |  3.7 KB  |  87 lines

  1. Newsgroups: alt.irc
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!nigel.msen.com!fmsrl7!lynx!SantaFe!news.santafe.edu!scott
  3. From: scott@sfi.santafe.edu (Scott D. Yelich)
  4. Subject: Re: baloo.doc..how to create a bot!
  5. Message-ID: <SCOTT.92Nov8222012@sfi.santafe.edu>
  6. Date: Mon, 09 Nov 92 05:20:12 GMT
  7. Organization: Santa Fe Institute
  8. In-Reply-To: axl@cheetah.math.oxy.edu.'s message of 6 Nov 92 20:57:34 GMT
  9. References: <1992Nov6.205734.7185@cheshire.oxy.edu>
  10. Lines: 75
  11.  
  12. > Does anybody still have the original how to make a baloo bot style
  13. > ehhehe bot available...if you do could you e-mail it to me.
  14. > I'd like to see what the big fuss is all about...
  15. >  --Eli
  16. > Riesgo on IRC
  17. > P.S. dont worry..my bot is probably and surely more advanced than
  18. > any baloobot slapped together with one's .ircrc file....just
  19. > curious as what to this moronic fool told the kiddies...so I can
  20. > laugh my ass off too!!!!!!
  21. > HA! thanks again! 
  22.  
  23. Um, yeah, I have your bot up for FTP.  *GRIN*
  24.  
  25. Here, I think this came from baloo version .01-- The high level code
  26. at the right has been kept intact for proper translation into IRC][
  27. script.
  28.  
  29. sub AdminOP {                    # +o my Admin and -o others.
  30.   local($_, $type, $showtype, $who, $how);    #  Locals.
  31.   local($text, $string, $words, @words);    #  Locals.
  32.   local($delay);                #  Locals.
  33.   if (@_) {                    #  Passed?
  34.     $type = shift;                #   TYPE = first,
  35.     $string = "@_";                #   STRING = rest.
  36.     $string =~ s/(\W)/\\\1/g;            #   Protect characters.
  37.   } else {                    #  Nothing passed?
  38.     $_=$V{'WHAT'};                #   temp = WHAT.
  39.     $type=$V{"Admin-{$_}"} ||            #   Use type for WHAT, else
  40.       $V{'Admin-{}'};                #   Use Default type.
  41.   }                        #  End.
  42.   if ($V{'A.Types'} =~ /[+]?[$type,\*]+/    #  If type is allowed and
  43.    && $V{'A.Types'} !~ /\-[$type,~]+/) {    #  If type not disallowed:
  44.     $who = $V{"Admin-($type)"}            #  Send to
  45.      || $V{'Admin-()'};                #   default.
  46.     for (split(/ /, $who)) {            #   For each A...
  47.       next if (($V{"Admin-$_.Types"} =~        #   Skip if type
  48.        /\-[$type,~]+/) && ($type ne '!'));    #     not wanted, type not "!".
  49.       next if (($V{"Admin-$_.Status"} =~    #   Skip if status
  50.        /Away/) && ($type ne '!'));        #     is /Away/, type not "!".
  51.       if ($V{"Admin-$_.Types"} =~        #   If wanted
  52.        /[+]?[$type,\*]+/ || $type eq "!" ) {    #     these this type:
  53.         $showtype = ($V{"Admin-$_.Types"} =~    #    Show the TYPE
  54.          /\*/) ? "$type" : '';            #      if want type *.
  55.     $words = $V{"Admin-$_.\[$type\]"}    #   Send WORDS = NICK-TYPE?
  56.          || $V{"A.\[$type\]"}            #     TYPE?
  57.          || $V{'A.[]'};                #     Default.
  58.         $words = eval "\"$words\"";        #   Substitute in vars ...
  59.     $text = "$string"            #   Send TEXT = STRING?
  60.          || $V{"Admin-$_.<$type>"}        #     NICK-TYPE?
  61.          || $V{"A.<$type>"}            #     TYPE?
  62.          || $V{"A.<>"};                #     Default.
  63.         $text = eval "\"$text\"";        #   Substitute in vars.
  64.     $words =~ s/~/$text/ge;            #   put TEXT in Words
  65.         $words =~ s/(\W)/\\\1/g;        #   Protect characters.
  66.         @words = split(/ /, $words);        #   Separate via SPACEs.
  67.         $delay = $V{"Admin-$_.SendDelay_$type"}    #   Delay is nick_type?
  68.          || $V{"A.SendDelay_$type"}        #     default_type?
  69.      || $V{"A.SendDelay"};            #     default.
  70.         $string="&Send(\"$words[$[] $_ ";    #   Feedback is PROTOCOL Nick +
  71.         $string.="$showtype ";            #     show type?
  72.         $string.="@words[$[+1..$#words]\n\");";    #     rest of message.
  73.         &Q($delay, $string);            #   Queue it with D.
  74.       }                        #   End.
  75.     }                        #  End.  
  76.   }                        #  End.
  77. }                        # Exit.
  78.  
  79.  
  80. Hmmm, perhaps I oughtta post source for death or medussa.  Naw, I
  81. liked baloobot-- it was fun to play with.  ELF, ah... more fun.  Ciao!
  82. Who was it that wanted everyone to have the same bot?  Drop me a line.
  83.  
  84. Scott
  85.  
  86.  
  87.