cgrunwald

Untitled

Jul 11th, 2010
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  *  @author Juntalis
  3.  */
  4. var ParserData =
  5. {
  6.     Events:
  7.     [
  8.         {
  9.             Name : "Bot.Loaded",
  10.             Alias : "bot.start",
  11.             ArgCount :  0,
  12.             ArgValues : [],
  13.             RegexCatch : /^TORIBASH\ 30$/m,
  14.             RaiseEvent : function(event){}
  15.         },
  16.         {
  17.             Name : "Bot.Ended",
  18.             Alias : "bot.end",
  19.             ArgCount :  0,
  20.             ArgValues : [],
  21.             RegexCatch : null,
  22.             RaiseEvent : function(event){}
  23.         },
  24.         {
  25.             Name : "Server.Message",
  26.             Alias : "server.msg",
  27.             ArgCount : 1,
  28.             ArgValues :
  29.             [
  30.                 {
  31.                     type : "String",
  32.                     alias : "msg"
  33.                 }
  34.             ],
  35.             RegexCatch : /^SAY\ 0;(.*?)$/m,
  36.             RaiseEvent : function(event){}
  37.         },
  38.         {
  39.             Name : "User.Join",
  40.             Alias : "user.join",
  41.             ArgCount :  1,
  42.             ArgValues :
  43.             [
  44.                 {
  45.                     type : "User",
  46.                     alias : "user"
  47.                 }
  48.             ],
  49.             RegexCatch : null,
  50.             RaiseEvent : function(event){}
  51.         },
  52.         {
  53.             Name : "User.Leave",
  54.             Alias : "user.leave",
  55.             ArgCount :  2,
  56.             ArgValues :
  57.             [
  58.                 {
  59.                     type : "User",
  60.                     alias : "user"
  61.                 },
  62.                 {
  63.                     type : "String",
  64.                     alias : "reason"
  65.                 }
  66.             ],
  67.             RegexCatch : /^DISCONNECT ([0-9]*?);(.*?) disconnected\.(.*?)$/m,
  68.             RaiseEvent : function(event){}
  69.         },
  70.         {
  71.             Name : "User.Say",
  72.             Alias : "user.say",
  73.             ArgCount :  2,
  74.             ArgValues :
  75.             [
  76.                 {
  77.                     type : "User",
  78.                     alias : "user"
  79.                 },
  80.                 {
  81.                     type : "String",
  82.                     alias : "msg"
  83.                 }
  84.             ],
  85.             RegexCatch :  /^SAY\ ([0-9]*?);(.*?):\ (.*?)$/m,
  86.             RaiseEvent : function(event){}
  87.         },
  88.         {
  89.             Name : "User.Whisper",
  90.             Alias : "user.whisper",
  91.             ArgCount :  2,
  92.             ArgValues :
  93.             [
  94.                 {
  95.                     type : "User",
  96.                     alias : "user"
  97.                 },
  98.                 {
  99.                     type : "String",
  100.                     alias : "msg"
  101.                 }
  102.             ],
  103.             RegexCatch : /^WHISPER\ 0;\*(.*?):\ (.*?)$/m,
  104.             RaiseEvent : function(event){}
  105.         }
  106.     ],
  107.     Comparisons :
  108.     [
  109.         {
  110.             Name : "Equals",
  111.             Alias : "==",
  112.             ArgumentTypes: "Any",
  113.             Action : function(A,B) {
  114.                 return (A==B) ? true : false;  
  115.             },
  116.             FlagsPossible : [ "RX", "IC" ]
  117.         },
  118.         {
  119.             Name : "Not Equal",
  120.             Alias : "!=",
  121.             ArgumentTypes: "Any",
  122.             Action : function(A,B) {
  123.                 return (A!=B) ? true : false;  
  124.             },
  125.             FlagsPossible : [ "RX", "IC" ]
  126.         },
  127.         {
  128.             Name : "Includes Anywhere",
  129.             Alias : "*=",
  130.             ArgumentTypes: "String",
  131.             Action : function(A,B) {
  132.                 return (A.match(B) != null) ? true : false;
  133.             },
  134.             FlagsPossible : [ "IC", "RX", "SM"]
  135.         },
  136.         {
  137.             Name : "Does Not Include Anywhere",
  138.             Alias : "!*=",
  139.             ArgumentTypes: "String",
  140.             Action : function(A,B) {
  141.                 return (A.match(B) == null) ? true : false;
  142.             },
  143.             FlagsPossible : [ "IC", "RX"]
  144.         },
  145.         {
  146.             Name : "Starts With",
  147.             Alias : "^=",
  148.             ArgumentTypes: "String",
  149.             Action : function(A,B) {
  150.                 if (B.length > A.length) return false;
  151.                 return (A.substr(0,B.length) == B) ? true : false; 
  152.             },
  153.             FlagsPossible : [ "IC", "RX"]
  154.         },
  155.         {
  156.             Name : "Does Not Starts With",
  157.             Alias : "!^=",
  158.             ArgumentTypes: "String",
  159.             Action : function(A,B) {
  160.                 if (B.length > A.length) return true;
  161.                 return (A.substr(0,B.length) != B) ? true : false; 
  162.             },
  163.             FlagsPossible : [ "IC", "RX"]
  164.         },
  165.         {
  166.             Name : "Ends With",
  167.             Alias : "$=",
  168.             ArgumentTypes: "String",
  169.             Action : function(A,B) {
  170.                 if (B.length > A.length) return false;
  171.                 return (A.substr((B.length*(-1)),B.length) == B) ? true : false;
  172.             },
  173.             FlagsPossible : [ "IC", "RX"]
  174.         },
  175.         {
  176.             Name : "Ends With",
  177.             Alias : "!$=",
  178.             ArgumentTypes: "String",
  179.             Action : function(A,B) {
  180.                 if (B.length > A.length) return true;
  181.                 return (A.substr((B.length*(-1)),B.length) != B) ? true : false;
  182.             },
  183.             FlagsPossible : [ "IC", "RX"]
  184.         },
  185.         {
  186.             Name : "Is Bigger Than",
  187.             Alias : "!$=",
  188.             ArgumentTypes: "Integer",
  189.             Action : function(A,B) {
  190.                 return (A>B) ? true : false;
  191.             },
  192.             FlagsPossible : []
  193.         },
  194.         {
  195.             Name : "Is Smaller Than",
  196.             Alias : "!$=",
  197.             ArgumentTypes: "Integer",
  198.             Action : function(A,B) {
  199.                 return (A<B) ? true : false;
  200.             },
  201.             FlagsPossible : []
  202.         }
  203.     ],
  204.     Flags :
  205.     [
  206.         {
  207.             Name : "Ignore Case",
  208.             Alias : "IC"
  209.         },
  210.         {
  211.             Name : "Regular Expression",
  212.             Alias : "RX"
  213.         },
  214.         {
  215.             Name : "Single Match",
  216.             Alias : "SM"
  217.         }
  218.     ],
  219.     Methods :
  220.     [
  221.         {
  222.             Name : "Say",
  223.             Alias : "bot.say",
  224.             ArgCount : 1,
  225.             Arguments :
  226.             [
  227.                 {
  228.                     name : "msg",
  229.                     type : "String"
  230.                 }
  231.             ],
  232.             Returns : null,
  233.             Action : function(args){}
  234.         },
  235.         {
  236.             Name : "Whisper User",
  237.             Alias : "bot.whisper",
  238.             ArgCount : 2,
  239.             Arguments :
  240.             [
  241.                 {
  242.                     name : "name",
  243.                     type : "String"
  244.                 },
  245.                 {
  246.                     name : "msg",
  247.                     type : "String"
  248.                 }
  249.             ],
  250.             Returns : null,
  251.             Action : function(args){}
  252.         },
  253.         {
  254.             Name : "Op User",
  255.             Alias : "bot.op",
  256.             ArgCount : 1,
  257.             Arguments :
  258.             [
  259.                 {
  260.                     name : "name",
  261.                     type : "String"
  262.                 }
  263.             ],
  264.             Returns : null,
  265.             Action : function(args){}
  266.         },
  267.         {
  268.             Name : "DeOp User",
  269.             Alias : "bot.deop",
  270.             ArgCount : 1,
  271.             Arguments :
  272.             [
  273.                 {
  274.                     name : "name",
  275.                     type : "String"
  276.                 }
  277.             ],
  278.             Returns : null,
  279.             Action : function(args){}
  280.         },
  281.         {
  282.             Name : "Kick User",
  283.             Alias : "bot.kick",
  284.             ArgCount : 1,
  285.             Arguments :
  286.             [
  287.                 {
  288.                     name : "name",
  289.                     type : "String"
  290.                 }
  291.             ],
  292.             Returns : null,
  293.             Action : function(args){}
  294.         },
  295.         {
  296.             Name : "Ban User",
  297.             Alias : "bot.ban",
  298.             ArgCount : 1,
  299.             Arguments :
  300.             [
  301.                 {
  302.                     name : "name",
  303.                     type : "String"
  304.                 }
  305.             ],
  306.             Returns : null,
  307.             Action : function(args){}
  308.         },
  309.         {
  310.             Name : "Centerprint",
  311.             Alias : "bot.centerprint",
  312.             ArgCount : 1,
  313.             Arguments :
  314.             [
  315.                 {
  316.                     name : "msg",
  317.                     type : "String"
  318.                 }
  319.             ],
  320.             Returns : null,
  321.             Action : function(args){}
  322.         },
  323.         {
  324.             Name : "HTTP Get",
  325.             Alias : "http.get",
  326.             ArgCount : 1,
  327.             Arguments :
  328.             [
  329.                 {
  330.                     name : "url",
  331.                     type : "String"
  332.                 }
  333.             ],
  334.             Returns : "String",
  335.             Action : function(args){}
  336.         },
  337.         {
  338.             Name : "HTTP Post",
  339.             Alias : "http.post",
  340.             ArgCount : 2,
  341.             Arguments :
  342.             [
  343.                 {
  344.                     name : "url",
  345.                     type : "String"
  346.                 },
  347.                 {
  348.                     name : "body",
  349.                     type : "String"
  350.                 }
  351.             ],
  352.             Returns : "String",
  353.             Action : function(args){}
  354.         },
  355.         {
  356.             Name : "Get MD5 Hash",
  357.             Alias : "encode.md5",
  358.             ArgCount : 1,
  359.             Arguments :
  360.             [
  361.                 {
  362.                     name : "str",
  363.                     type : "String"
  364.                 }
  365.             ],
  366.             Returns : "String",
  367.             Action : function(args){}
  368.         },
  369.         {
  370.             Name : "Base64 Encode",
  371.             Alias : "encode.b64encode",
  372.             ArgCount : 1,
  373.             Arguments :
  374.             [
  375.                 {
  376.                     name : "str",
  377.                     type : "String"
  378.                 }
  379.             ],
  380.             Returns : "String",
  381.             Action : function(args){}
  382.         },
  383.         {
  384.             Name : "Base64 Decode",
  385.             Alias : "encode.b64decode",
  386.             ArgCount : 1,
  387.             Arguments :
  388.             [
  389.                 {
  390.                     name : "str",
  391.                     type : "String"
  392.                 }
  393.             ],
  394.             Returns : "String",
  395.             Action : function(args){}
  396.         },
  397.     ]
  398. };
Add Comment
Please, Sign In to add comment