"Admin :nick: joined" by User's Q-Auth

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

"Admin :nick: joined" by User's Q-Auth

Postby sHiZo » Mon Apr 13, 2009 12:47 am

Hello sp00fed,

as the topic say's I am in need of a script that reads an .txt file with "Quakenet auth nicks" in it and then say's something like

"Admin :nick: choined Channel"

I already have an working VIP Script, but unfortunately it does not display anything for Chan Owners, it just gives op.

I dont know if there is a public script for this but at least i havent found anything like that.

Note: It does not have to read auths from a .txt file, it's just the easiest way I could think of.

I can not script tcl on my own, thats why I need your help.

Thanks a lot in advance! ;)

Re: "Admin :nick: joined" by User's Q-Auth

Postby Cristian » Sat Apr 18, 2009 6:48 pm

this was done as a quickie ;)

I did this so it reads from a text file, easier to edit.
There is no public commands.

To make the script work:

in partyline:
    .chanset #channel +greeting
    edit ./scripts/greet.db (or database in script)

Code: Select all
setudef flag greeting
namespace eval greet {
   namespace eval variable {
      variable database "./scripts/greet.db"
      variable rawid 666
   bind JOIN - *       [namespace current]::join   
   proc join {nickname hostname handle channel} {
      global greet
      if {[channel get $channel greeting]} {
         set greet($hostname.data) "$hostname [string tolower $channel]"
         bind RAW -|- {354} [namespace current]::raw354
         bind RAW -|- {315} [namespace current]::raw354_end
         putserv "WHO $nickname n%nahut,666"
   proc raw354 {server raw arguments} {
      global greet
      set rawid "[lindex [split $arguments] 1]"
      set nickname [lindex [split $arguments] 4]
      set hostname "[lindex [split $arguments] 2]@[lindex [split $arguments] 3]"
      if {[string equal -nocase $rawid $::greet::variable::rawid]} {
         if {![string match [lindex [split $arguments] 5] 0] > 0} {
            set authname "[string tolower [lindex [split $arguments] 5]]"
            if {[info exists greet($hostname.data)]} {
               if {[string match [lindex $greet($hostname.data) 0] $hostname] > 0} {
                  set channel [lindex $greet($hostname.data) 1]

                  if {[checkgreet $authname $channel] == 1} {      
                     putmsg $channel "Admin $nickname joined Channel"
      if {[info exists greet($hostname.data)]} {
         unset greet($hostname.data)
   proc raw354_end {server raw arguments} {
      catch { unbind RAW -|- {354} [namespace current]::raw354 }
      catch { unbind RAW -|- {315} [namespace current]::raw354_end }
   proc checkgreet {authname channel} {
      set result 0
      set database [open $::greet::variable::database r]
      while {![eof $database]} {
         set temp [string tolower [gets $database]]
         if {[string match "*|*" "$temp"] > 0} {
            set temporary_authname [lindex [split $temp |] 0]
            set temporary_channel [lindex [split $temp |] 1]
            if {[string match $temporary_authname $authname] > 0} {
               if {[string match $temporary_channel $channel] > 0} {
                  set result 1
      close $database
      return $result
putlog "\00304[string range [info script] 0 end]\00304 \002loaded...\002"

This is how the file should look like. (./scripts/greet.db or database)
Code: Select all
proof of advance
proof of advance
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Return to TCL Scripting Request

Who is online

Users browsing this forum: No registered users and 3 guests