Coders-IRC


IRC for Coders

Window Dialog


image

;=====================================================
; ChatToIRC
; DIVERSE ZAKEN VOOR ChatToIRC
;=====================================================
;=====================================================
; Auteur: JamesBond
; Homepagina: https://chatplezier.com
; Netwerk: ChatPlezier
; Server: irc.chatplezier.com
; Email: jamesbond@chatplezier.com
;=====================================================

alias ChatToIRC-Ops { dialog -dm ChatToIRC-ops ChatToIRC-ops }

dialog ChatToIRC-Ops {
  title "  ChatToIRC Ops Menu"
  size -1 -1 140 90
  icon $icodir(emoticon.ico), 0 noborder
  option dbu
  tab "Notices", 1, 2 1 135 85 
  tab "Channels", 2
  tab "Kicks/Bans", 3
  tab "Clones", 4 
  button " Aanzetten", 7, 30 20 70 10,tab1 
  button " Uitzetten", 8, 30 40 70 10,tab1
  button " Aanzetten", 9, 30 20 70 10,tab2
  button " Uitzetten", 10, 30 40 70 10,tab2
  button " Aanzetten", 11, 30 20 70 10,tab3
  button " Uitzetten", 12, 30 40 70 10,tab3
  button " Aanzetten", 13, 30 20 70 10,tab4
  button " Uitzetten", 14, 30 40 70 10,tab4
  button " Sluiten", 19, 30 60 70 10,ok
}
on *:dialog:ChatToIRC-Ops:sclick:7:{ .set %Notices On | .set %Notices 1 | /window -n @Notice | echo -a 0,4 @Notices 0,12 Berichten Staat Nu AaN 0  }
on *:dialog:ChatToIRC-Ops:sclick:8:{ .set %Notices Off | .set %Notices 0 | /window -c @Notice | echo -a 0,4 @Notices 0,12 Berichten Staat Nu UiT 0  }
on *:dialog:ChatToIRC-Ops:sclick:9:{ .set %Channels On | .set %Channels 1 | /window -n @Channels | echo -a 0,4 @Channels 0,12 Berichten Staat Nu AaN 0  }
on *:dialog:ChatToIRC-Ops:sclick:10:{ .set %Channels Off | .set %Channels 0 | /window -c @Channels | echo -a 0,4 @Channels 0,12 Berichten Staat Nu UiT 0  }
on *:dialog:ChatToIRC-Ops:sclick:11:{ .set %Kicks/Bans On | .set %Kicks/Bans 1 | /window -n @Kicks/Bans | echo -a 0,4 @Kicks/Bans 0,12 Berichten Staat Nu AaN 0  }
on *:dialog:ChatToIRC-Ops:sclick:12:{ .set %Kicks/Bans Off | .set %Kicks/Bans 0 | /window -c @Kicks/Bans | echo -a 0,4 @Kicks/Bans 0,12 Berichten Staat Nu UiT 0  }
on *:dialog:ChatToIRC-Ops:sclick:13:{ .set %Clones On | .set %Clones 1 | /window -n @Cloons | echo -a 0,4 @Clones 0,12 Berichten Staat Nu AaN 0  }
on *:dialog:ChatToIRC-Ops:sclick:14:{ .set %Clones Off | .set %Clones 0 | /window -c @Cloons | echo -a 0,4 @Clones  0,12 Berichten Staat Nu UiT 0  }

on 1:START:{
  if (%Notices == 1) {  echo -m Notices Window 3Active | /window -n @Notice }
  if (%Channels == 1) {  echo -m Channels Window 3Active | /window -n @Channels }
  if (%Kicks/Bans == 1) { echo -m Kicks/Bans Window 3Active | /window -n @Kicks/Bans }
  if (%Clones == 1) { echo -m Clones Window 3Active | /window -n @Cloons }
}

on *:NOTICE:*:*: {
  if (%Notices == 1) { 
    if ($window(Notice)) && ($nick != $me)  {
      /window -m @Notice 
      /aline -n @Notice @Notice | echo @Notice 10[ $+ $time $+ ]12[ $+ $date $+ ]13 $network 10[NOTICE] 4 $+ $nick 1stuurde je net notice 4Bericht:12 
    } 
    elseif ($nick != $me) {
      /window -m @Notice 
      /aline -n @Notice @Notice | echo @Notice 10[ $+ $time $+ ]12[ $+ $date $+ ]13 $network 10[NOTICE] 4 $+ $nick 1stuurde je net notice 4Bericht:12 $1- 
    }
  }
}

on 1:BAN:#:{
  if (%Kicks/Bans == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Kicks/Bans
    /aline -n @Kicks/Bans @Kicks/Bans | echo @Kicks/Bans 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[BAN]14 $chan 4 $+ $nick 12zet mode4 $1- 
  }
}
on 1:UNBAN:#:{
  if (%Kicks/Bans == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Kicks/Bans
    /aline -n @Kicks/Bans @Kicks/Bans | echo @Kicks/Bans 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[UNBAN]14 $chan 4 $+ $nick 12zet mode4 $1- 
  }
}
on 1:KICK:#:{
  if (%Kicks/Bans == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Kicks/Bans
    /aline -n @Kicks/Bans @Kicks/Bans | echo @Kicks/bans 10[ $+ $time $+ ]12[ $+ $date $+ ] 4[KICK]14 $chan 4 $+ $nick 2kick 6 $+ $knick 12 $1-
  }
}
on 1:VOICE:#:{
  if (%Channels == 1) {
    if ($me isin $nick) { Halt } 
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[VOICE]14 $chan 4 $+ $nick 7voice12 $vnick
  }
}
on 1:DEVOICE:#:{
  if (%Channels == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[Devoice]14 $chan 4 $+ $nick 7devoice12 $vnick
  }
}
on 1:HELP:#:{
  if (%Channels == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels  10[ $+ $time $+ ]12[ $+ $date $+ ] 10[HALFOP]14 $chan 4 $+ $nick 7halfop12 $hnick
  }
}
on 1:DEHELP:#:{
  if (%Channels == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[DEHALFOP]14 $chan 4 $+ $nick 7Dehalfop12 $hnick
  }
}
on 1:OP:#:{
  if (%Channels == 1) { 
    if ($me isin $nick) { Halt }
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[OP]14 $chan 4 $+ $nick 7op12 $opnick
  }
}
on 1:DEOP:#:{
  if (%Channels == 1) { 
    if ($me isin $nick) { Halt }
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[DEOP]14 $chan 4 $+ $nick 7deop12 $opnick
  }
}
on 1:OWNER:#:{
  if (%Channels == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[OWNER]14 $chan 4 $+ $nick 7owner12 $opnick
  }
}
on 1:DEOWNER:#:{
  if (%Channels == 1) {
    if ($me isin $nick) { Halt }
    /window -m @Channels
    /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[DEOWNER]14 $chan 4 $+ $nick 7deowner12 $opnick
  }
}

###HL

on *:Join:#: {
  if (%Clones == 1) {
    var %host_to_search_for = $address($nick,2)
    var %number_from_that_host = $ialchan(%host_to_search_for,$chan,0)
    if (%number_from_that_host > 1) {
      ;we have clones!
      ;first set up our vars and loop
      var %count = 0
      unset %clones
      :loop
      inc %count
      ;loop through every nick, adding the nicks to %clones
      var %clones = %clones $ialchan(%host_to_search_for,$chan,%count).nick
      if (%count < %number_from_that_host) { goto loop }
      /window -m @Cloons
      //aline -n @Cloons @Cloons | echo @Cloons 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[CLOONS] 12op 14 $+ $chan 4 $+ %count $+  7-Cloons Gedetecteerd- 12Cloons Van 4 $+ $address($nick,2)
      //aline -n @Cloons @Cloons | echo @Cloons 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[Nick Cloons] 12op 14 $+ $chan $+ :12 %clones
    }
  }
}

alias open {
  .window -ekn @Services 0 0 718 504 @Services Comic Sans MS 11
  .window -ekn @Notice 0 0 718 504 @Notice Courier New 10
}

On ^*:NoticE:*:#: {
  if (%Notices == 1) { 
    if ($nick isop $comchan($nick,1)) || ($nick isvo $comchan($nick,1)) { goto n }
    if ($nick == chanserv) || ($nick == memoserv) || ($nick == operserv) || (nickserv == $nick) { .echo @Services [  $nick $+ : $+ $chan ] $1- | halt }
    else { .echo @Notice 10[ $+ $time $+ ]12[ $+ $date $+ ]13 $network 10[NOTICE] 4 $+ $nick 1 - $+ $chan $+ -  $1- | halt }
    else { .echo @Notice Notice $nick - $+ $chan $+ -  $1- | halt }
    :n
  }
}

On ^*:NoticE:*:?: {
  if (%Notices == 1) { 
    if  ($nick isop $comchan($nick,1)) || ($nick isvo $comchan($nick,1)) { goto n }
    if ($nick == chanserv) || ($nick == memoserv) || ($nick == operserv) || (nickserv == $nick) { .echo @Services [  $nick  ] $1- | halt }
    else { .echo @Notice Notice $nick -Private-  $1- | halt }
    :n
  }
}

alias faddr {
  if (!$window(@Address)) { window -azdBke2 @Address $calc($window(-1).w /2 -250) $calc($window(-1).h /2 -125) 500 250 }
  if ($1) { search.addr $1- }
}
on *:INPUT:@Address: { if ($left($1,1) != /) && (!$ctrlenter) { search.addr $1- } }
alias search.addr {
  var %:adr = $1-, %:a = 1
  aline -h @Address $chr(160)
  $iif($ial(%:adr,0),aline -h 4 @Address %:adr $+($chr(40),$v1,$chr(41)) on $network is:,aline -h 4 @Address %:adr no address found on $network)
  while (%:a <= $ial(%:adr,0)) {
    aline -h 15 @Address $+(%:a,$chr(41)) $+(14,$ial(%:adr,%:a).nick,) - $ial(%:adr,%:a).addr
    inc %:a
  }
}



Expand


Read More

[DE] YouTube Announcer (mSL)


image

Read More

Auto Connect/Join/Identify v2.1


image

;Shows a link to the script when you right click a status, query or channel window
menu status,query,channel {
  Auto Connect/Join/Identify v2.1:/sci01
}

;Calls the dialog window initialisation and loads the first tab
alias sci01 { dialog -m scd01 scd01 | set %tab.scd01 1 }

;Initialises the dialog window
dialog scd01 {
  title "Auto Connect/Join/Identify v2.1"
  size -1 -1 355 390
  tab "Server 1", 1, 5 5 345 265
  tab "Server 2", 2
  tab "Server 3", 3
  tab "Server 4", 4
  tab "Server 5", 5

  text "Servers address", 6, 15 30 160 12
  edit "", 7, 15 45 160 20, autohs
  text "Server network", 43, 180 30 160 12
  edit "", 44, 180 45 160 20, autohs

  text "Primary nick", 8, 22 80 75 12
  edit "", 9, 20 94 85 20, autohs
  text "Password", 10, 112 80 75 12
  edit "", 11, 110 94 60 20, autohs
  text "Secondary nick", 40, 22 117 75 12
  edit "", 41, 20 132 85 20, autohs
  box "Nicknames", 48, 15 65 160 100

  text "Add channel to this server", 49, 22 180 140 20
  edit "", 50, 20 194 155 21, autohs
  button "Add Channel", 51, 20 220 155 25
  text "View/delete existing channels", 46, 182 180 150 20
  combo 45, 180 194 155 20, drop
  button "Delete", 52, 180 220 155 25
  box "Channels", 47, 15 165 325 90

  check "A Conn/Join", 33, 188 83 80 12
  check "A Nickname", 34, 188 103 88 12
  check "A Identify", 35, 188 123 80 12
  check "A Ghost", 42, 188 143 80 12
  box "Options", 32, 180 65 100 100

  button "SET", 36, 285 70 55 35
  button "CLOSE", 37, 285 110 55 35, cancel

  box "Help", 38, 5 270 345 110
  text "", 39, 10 283 325 92, multi
}

;On initialisation, display default help text and load first tab
on 1:dialog:scd01:init:*: {
  did -ra $dname 39 Please hover over a button, checkbox or Edit box for help.
  scd01.loadgui 1
}

;loads the gui with the information for the required tab ( called with $1 being tab number )
alias scd01.loadgui { 
  if ($rs($1, AC) == 1) { did -c scd01 33 } 
  else { did -u scd01 33 }
  if ($rs($1, AN) == 1) { did -c scd01 34 } 
  else { did -u scd01 34 }
  if ($rs($1, AP) == 1) { did -c scd01 35 } 
  else { did -u scd01 35 }
  if ($rs($1, AG) == 1) { did -c scd01 42 } 
  else { did -u scd01 42 }
  did -ra scd01 7 $rs($1, Server)
  did -ra scd01 44 $rs($1, Network)
  did -ra scd01 9 $rs($1, Nick)
  did -ra scd01 41 $rs($1, Nick2)
  if ($rs($1, Password) != $null) { did -ra scd01 11 [Hidden] }
  else did -ra scd01 11 [None]

  did -r scd01 45   
  set %rid 0 
  while (%rid < $rs($1,Channels)) {
    did -a scd01 45 $rs($1, Room $+ %rid)
    inc %rid
  }
  unset %rid
}

;When hovering over any of the edit boxes, check boxes or buttons, the help label will display help information for that element
on 1:dialog:scd01:mouse:*: {
  if ($did == 7) { did -ra $dname 39 Enter the server address here. e.g. irc.gamesurge.net }
  elseif ($did == 9) { did -ra $dname 39 Enter the primary Nickname you would like to use on this server. Your nick will automatically be set to what is entered here if you have the Auto Nickname option selected. $crlf $+ If it's already in use, and the Auto-ghost option is ticked, the nick will be ghosted and you will be set to this nick. }
  elseif ($did == 41) { did -ra $dname 39 Enter the secondary Nickname you would like to use on this server. If your Primary nick is already in use, and Auto-ghost is not enabled, your nick will automatically be set to this. }
  elseif ($did == 11) { did -ra $dname 39 Here you will enter the password to the nickname to the left if your nickname is registered and you selected the auto nickname option. Will automatically identify you when nickserv asks for the password }
  elseif ($did == 13) || ($did == 15) || ($did == 17) || ($did == 19) || ($did == 21) || ($did == 23) || ($did == 25) || ($did == 27) || ($did == 29) || ($did == 31) { did -ra $dname 39 If Auto connect is selected, you will join these channels when you connect to this server. }
  elseif ($did == 32) { did -ra $dname 39 Choose which options you would like for this server. Auto connect will automatically connect you to the server and the listed channels. Auto nick will automatically set your nick. Auto Password will automatically identify you when needed. Auto Ghost will ghost your primary nick if it is already in use. If not selected, your secondary nick will be used. $crlf $+ Auto-ghost requires a secondary nick active. }
  elseif ($did == 36) { did -ra $dname 39 By clicking this button all the info in the edit boxes will be saved for this server. }
  elseif ($did == 37) { did -ra $dname 39 By clicking this button all changes will be lost. Be sure to click the Set button is you want to save this configuration. }
  elseif ($did == 44) { did -ra $dname 39 Enter the servers network here. $crlf $+ Find this out by typing '//echo -a $network' whilst connected the the server. eg. GameSurge }
  elseif ($did == 50) || ($did == 51) { did -ra $dname 39 Enter a channel name and then click the Add button to add that channel to this servers autojoin list. If the channel has a password, enter it after the channel. $crlf e.g. #channelwithpassword password }
  elseif ($did == 45) || ($did == 52) { did -ra $dname 39 Use the dropdown menu to view the channels set to automatically join when this server starts. If you wish to delete one, pick it from the list then click the Delete button. }
}

;Listens for clicks on the tabs and set button
on 1:dialog:scd01:sclick:*: {
  ;If a tab is clicked, load that information into the editable fields and textboxes
  if (($did == 1) || ($did == 2) || ($did == 3) || ($did == 4) || ($did == 5)) {
    set %tab.scd01 $did
    scd01.loadgui $did
  }

  ;If the set button is clicked, save all information into the Settings.ini file
  if ($did == 36) {
    if ($did($dname, 7).text != $null) { $ws(%tab.scd01, Server, 7) }
    else { $rms(%tab.scd01, Server) }
    if ($did($dname, 44).text != $null) { $ws(%tab.scd01, Network, 44) }
    else { $rms(%tab.scd01, Network) }
    if ($did($dname, 9).text != $null) { $ws(%tab.scd01, Nick, 9) }
    else { $rms(%tab.scd01, Nick) }
    if ($did($dname, 41).text != $null) { $ws(%tab.scd01, Nick2, 41) }
    else { $rms(%tab.scd01, Nick2) }
    if (($did($dname, 11).text != $null) && ($did($dname, 11).text != [hidden]) && ($did($dname, 11).text != [none])) { $ws(%tab.scd01, Password, 11) }
    if ($did($dname, 11).text == $null) { $rms(%tab.scd01, Password) }

    if ($did($dname, 33).state == 1) { $ws(%tab.scd01, AC, 33) }
    else { $rms(%tab.scd01, AC) }
    if ($did($dname, 34).state == 1) { $ws(%tab.scd01, AN, 34) }
    else { $rms(%tab.scd01, AN) }
    if ($did($dname, 35).state == 1) { $ws(%tab.scd01, AP, 35) }
    else { $rms(%tab.scd01, AP) }
    if ($did($dname, 42).state == 1) { $ws(%tab.scd01, AG, 42) }
    else { $rms(%tab.scd01, AG) }
  }

  ;If the add channel button is clicked, add a channel to the current server in the Settings.ini file
  if ($did == 51) {
    if ($did($dname, 50).text != $null) { 

      if ($rs(%tab.scd01, Channels) != $null) {
        set %channels $rs(%tab.scd01, Channels)
      }
      else set %channels 0

      $ws(%tab.scd01, Room $+ %channels, 50) 
      did -a scd01 45 $rs(%tab.scd01, Room $+ %channels)
      inc %channels
      writeini Settings.ini Server $+ %tab.scd01 Channels %channels
      did -r scd01 50
      unset %channels
    }
  }

  ;If the delete channel button is clicked, delete the current channel in the combo box from the Settings.ini file
  if ($did == 52) {
    if ($did($dname, 45) != $null) {
      set %channels $rs(%tab.scd01, Channels)
      set %n $did($dname, 45).sel
      dec %n
      $rms(%tab.scd01, Room $+ %n)
      did -d scd01 45 $did($dname, 45).sel
      dec %channels
      set %s %n
      while (%n < %channels) {
        inc %s
        writeini Settings.ini Server $+ %tab.scd01 Room $+ %n $rs(%tab.scd01, Room $+ %s)
        inc %n
      }
      $rms(%tab.scd01, Room $+ %n)
      unset %s
      writeini Settings.ini Server $+ %tab.scd01 Channels %channels
      unset %channels
      unset %n
    }
  }
}

;When mIRC starts, connect to each of the servers in the Settings.ini file with the primary nick supplied, if there is one.
on *:Start: {
  if ($rs(1, AC) == 1) { server $rs(1, Server) $iif($rs(1, AN) == 1 && $rs(1, nick) != $null, -i $rs(1, Nick),) }
  set %servc 2
  while (%servc <= 5) {
    if ($rs(%servc, AC) == 1) { 
      server -m $rs(%servc, Server) $iif($rs(%servc, AN) == 1 && $rs(%servc, nick) != $null, -i $rs(%servc, Nick),)
    }
    inc %servc
  }
  unset %servc
}

;When you connect to a server, check that it's one in the Settings.ini file and then connect to the supplied channels
on *:Connect: {
  set %servc 1
  while (%servc <= 5) {
    if (($rs(%servc, Network) == $network) && ($rs(%servc, AC) == 1)) { 
      ;channel counter
      set %chanc 0
      while (%chanc < $rs(%servc, Channels)) {
        join $rs(%servc, Room $+ %chanc)
        inc %chanc
      }
      unset %chanc
      if (($rs(%servc, Password) != $null) && ($rs(%servc, AP) == 1) && ($rs(%servc, nick) == $me)) { nickserv identify $rs(%servc, Password) }
    }
    inc %servc
  }
  unset %servc
}

;When nickserv asks to identify, do so with the supplied password from the Settings.ini file
on *:notice:*:?: {
  if (($nick == nickserv) && (identify isin $1-)) { 
    set %servc 1
    while (%servc <= 5) {
      if (($rs(%servc, AP) == 1) && ($server == $rs(%servc, Server))) {
        nickserv identify $rs(%servc, Password) 
      }
      inc %servc
    }
    unset %servc
  }
}

;When mIRC tells you that your primary nickname is already in use, change to your secondary nick, ghost the primary, and then change to it
raw 433:*:{ 
  autoghost $1-
}
alias autoghost {
  set %servc 1
  while (%servc <= 5) {
    if ($server == $rs(%servc, Server)) && ($rs(%servc, AG) == 1) {
      nick $rs(%servc, Nick2)
      timerghost1 1 2 nickserv ghost $2 $rs(%servc, Password)
      timerghost2 1 3 nick $2
    }
    inc %servc
  }
  unset %servc
}

;called by $rs(server number, item)
alias rs {
  return $readini(Settings.ini, Server $+ $1, $2)
}

;called by $ws(server number, item, id to read from)
alias ws {
  ;if it's a check box, write the checkboxes state, else write the editboxes text
  if ($3 == 33) || ($3 == 34) || ($3 == 35) || ($3 == 42) writeini Settings.ini Server $+ $1 $2 1
  else writeini Settings.ini Server $+ $1 $2 $did($dname,$3).text
}

;called by $rms(server number, item)
alias rms {
  remini Settings.ini Server $+ $1 $2
}


Auto Connect/Join/Identify v1.0

Expand


Read More