mircscripting.info Forum Index mircscripting.info
#mIRCscripting Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

.csc #channel ( Cservice Channel Application Check )

 
Post new topic   Reply to topic    mircscripting.info Forum Index -> Addons
View previous topic :: View next topic  
Author Message
XploreR
Major


Joined: 28 Dec 2007
Posts: 53
Location: Behind you!!!

PostPosted: Mon Feb 18, 2008 11:21 pm    Post subject: .csc #channel ( Cservice Channel Application Check ) Reply with quote

Script Updated, to work with the SSL new version of the site & added $exo (nohtml) alias that was missing
Easy to use, Type .csc #channel in any channel where the script is activated, For more help reply to this post :p

This Code is Allready Addapted For Undernet but it could be easily changed for differents networks. You just need to edit this line->
Code:
cservice.undernet.org


This could be kinda useful for some help channels when you need to check if a channel name is registered or not :p
( when your too lazy to type /msg x isreg #chan ) :p
===============
Just open your mIRC client when your on press [ALT] and [R] then click "Remotes" Then "File" then "New"

A Empty page will be open just copy the code in it and click "File" and "Save"

Here is the Code
Enjoy Smile

Code:
on ^*:TEXT:.csc *:#: {
  if ($sock(app)) { msg $chan [Error] < $+ $nick $+ > Socket in use | halt }
  if ($left($2,1) != $chr(35)) { msg $chan [Error] < $+ $nick $+ > Erroneus #channelname syntax | halt }
  unset %line , %apurl
  set %appchan $chan
  set %chan $remove($2,$left($2,1))
  app
}

alias app { unset %line | sockopen -e app cservice.undernet.org 443 }
alias -l exo { return $regsubex($1, /<[^>]+(?:>|$)|^[^<>]+>/g,) }

on 1:sockopen:app:{
  if (%apurl) { var %ap2 live/ $+ %apurl }
  else { var %ap2 live/check_app.php?name=%23 $+ %chan }

  sockwrite -tn $sockname GET / $+ %ap2 HTTP/1.1
  sockwrite -tn $sockname Host: cservice.undernet.org
  sockwrite -tn $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
  sockwrite -tn $sockname Connection: Close
  sockwrite -tn $sockname $crlf
}
on 1:sockread:app:{
  var %ap
  sockread -f %ap
  %ap = $remove(%ap,&nbsp;)

  echo -s *** 12 SOCKREAD: %ap
  if (Location: isin %ap) {
    set %apurl $remove(%ap,Location:)
    %apurl = $remove(%apurl,$chr(32))
    sockclose $sockname
    sockopen -e app cservice.undernet.org 443
  }
  if (*Channel :* iswm %ap) set %line %line [Channel] $remove($exo(%ap),Channel,:)
  if (*Posted on* iswm %ap) set %line %line [Date] $remove($exo(%ap),posted,on,:)
  if (*by user* iswm %ap) set %line %line [User] $remove($exo(%ap),by,user,:)
  if (*Current status* iswm %ap) set %line %line [Status] $remove($exo(%ap),current,status,:)
  if (*Decision date* iswm %ap) set %line %line [Decision Date] $remove($exo(%ap),Decision,date,:)
  if (*Decision comment* iswm %ap) set %line %line [Decision Comment] $remove($exo(%ap),Decision,comment,:)
}

on 1:sockclose:app:{
  if (%line) { msg %appchan [Application Status] $v1 | msg %appchan [URL]: %appurl }
  else { msg %appchan No applications matching $chr(35) $+ %chan were found }
  unset %line , %apurl , %appchan , %chan , %appchan
}


Original Code -> http://www.nomorepasting.com/getpaste.php?pasteid=37171

Thnx to SplitFire Very Happy ( again:) )


Last edited by XploreR on Tue Aug 16, 2016 12:26 am; edited 4 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
g13aoustis
earlybird


Joined: 01 Feb 2008
Posts: 5

PostPosted: Sat Mar 08, 2008 2:06 am    Post subject: modify Reply with quote

Code:
alias acheck {
  if ($sock(app)) { echo -a [ERROR] Socket in use | halt }
  unset %line , %apurl
  set %chan $remove($1,$left($1,1))
  app
  halt
}

alias app { unset %line | sockopen app cservice.undernet.org 80 }

on 1:sockopen:app:{
  if (%apurl) { var %ap2 live/ $+ %apurl }
  else { var %ap2 live/check_app.php?name=%23 $+ %chan }

  sockwrite -tn $sockname GET / $+ %ap2 HTTP/1.1
  sockwrite -tn $sockname Host: cservice.undernet.org
  sockwrite -tn $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
  sockwrite -tn $sockname Connection: Close
  sockwrite -tn $sockname $crlf
}
on 1:sockread:app:{
  var %ap
  sockread -f %ap
  %ap = $remove(%ap,&nbsp;)

  if (Location: isin %ap) {
    set %apurl $remove(%ap,Location:)
    %apurl = $remove(%apurl,$chr(32))
    sockclose $sockname
    sockopen app cservice.undernet.org 80
  }
  if (*Channel :* iswm %ap) set %channel $remove($exo(%ap),Channel,:)
  if (*Posted on* iswm %ap) set %datep  $remove($exo(%ap),posted,on,:)
  if (*by user* iswm %ap) set %username $remove($exo(%ap),by,user,:)
  if (*Current status* iswm %ap) set %status $remove($exo(%ap),current,status,:)
  if (*Description* iswm %ap) set %desc $remove($exo(%ap),Description,date,:)
}
on 1:sockclose:app:{
  if (%channel) { dialog -m acheck acheck }
  if (%line2) { dialog -m acheck acheck }
  elseif (%channel == $null) { echo -a No Applications Found For %chan }
  unset %channel , %datep , %apurl , %username , %chan , %status , %desc
}
alias exo {
  var %r, %x = $regsub($1-,/(<[^>]+>)/g,$null,%r)
  return $replace(%r,&amp;,&,&lt;,<gt>,&quot;,",&nbsp;,$chr(160),% $+ 20,$chr(32),',')
}

dialog acheck {
  title "Undernet Channel Application"
  size -1 -1 197 159
  option dbu
  text "Channel Application Status", 1, 14 5 159 8, center
  text "Channel:", 2, 15 25 26 8, center
  text %channel, 3, 47 24 65 9, center
  text "Posted on:", 4, 15 37 27 8, center
  text %datep, 5, 47 36 65 9, center
  text "By:", 6, 15 49 26 8, center
  text %username, 7, 47 48 65 9, center
  text "Status:", 8, 15 61 26 8, center
  text %status, 9, 47 60 65 9, center
  text "Description:", 10, 11 75 28 8, center
  text %desc, 11, 47 74 145 48
  button "OK", 12, 85 135 37 12, ok
}

menu * {
  -
  Channel App Status: /acheck $$?="What Channel?"
}


Heh i did it for your own use! Enjoy!
Back to top
View user's profile Send private message
demeteor
Quite Active


Joined: 31 Jan 2008
Posts: 29

PostPosted: Sat Mar 08, 2008 1:09 pm    Post subject: Reply with quote

heh nice one i have done it 2 have on a remote . bad thow , was going to be on a challenge thanks now i have to find something else code it and then add it as a challenge :p
_________________
-Meteor
Back to top
View user's profile Send private message
XploreR
Major


Joined: 28 Dec 2007
Posts: 53
Location: Behind you!!!

PostPosted: Sun Nov 16, 2008 1:32 am    Post subject: Re: modify Reply with quote

g13aoustis wrote:
Heh i did it for your own use! Enjoy!


Lol ty, i just noticed the post.


Btw, i just updated the First post..

the result is sent on 2 lines.

and no more error messages.

<@xplo> .csc #Couch
<@Couch> [CService Channel Application Status]
<@Couch> [Channel] #Couch [Date] Nov 15 2008 175514 CSST [User] Em3r1c4 [Status] Pending
_________________
Simple Things Are allways better!
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    mircscripting.info Forum Index -> Addons All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group