Advertisement
westor

Define command for Pred v1.0

Nov 10th, 2017
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.99 KB | None | 0 0
  1. alias -l getsite {
  2.   if (!$1-) || (!$isid) { return 0 }
  3.   var %com = getsite_ $+ $rand(1,1000000)
  4.   .comopen %com MSXML2.SERVERXMLHTTP.6.0
  5.   noop $com(%com,Open,1,bstr,GET,bstr,$1-,bool,false) $com(%com,Send,1) $com(%com,ResponseText,2)
  6.   var %a = $left($com(%com).result,4096)
  7.   :error
  8.   reseterror
  9.   if ($com(%com)) { .comclose %com }
  10.   if ($comerr) { return 0 }
  11.   return $iif(%a,$v1,0)
  12. }
  13. alias -l mod { return $iif($msgtags(user-type).key == mod || $mid(#,2-) == $nick, $true) }
  14.  
  15. on *:LOGON:*: {
  16.   raw CAP REQ :twitch.tv/membership
  17.   raw CAP REQ :twitch.tv/tags
  18.   raw CAP REQ :twitch.tv/commands
  19. }
  20.  
  21. ON *:TEXT:*:#: {
  22.   tokenize 32 $strip($1-)
  23.   if ($1 == !define) {
  24.     if (!$mod) { return }
  25.     if (!$2) { .msg $chan ( $+ $nick $+ ): Error, Not enough parameteres! | return }
  26.     var %d = $getsite(https://api.alixe.pro/define/?term= $+ $2-)
  27.     if (!%d) { .msg $chan ( $+ $nick $+ ): There are not any details founded. | return }
  28.     .msg $chan ( $+ $nick $+ ): %d
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement