This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Is it possible?

Old posts that have not been replied to for several years.
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

if {([string match -nocase "* master *" $text])) ( return )
Wtf, this ain't mirc scripting!

Code: Select all

if {[string match -nocase "* master *" $text]} {return}
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Not? Damnit, im on the wrong website again :P
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

But anyhow, the script doesnt seem to work -_-

This is the addop script

Code: Select all

bind pub o|o !addop pub:addop:q

proc pub:addop:q {nick uhost hand chan text} { 
if {[string length $text] > 0} { set tnick [lindex $text 0] }
if {[onchan "Q" $chan]} {
if {[string match -nocase "* master *" $text]} {return}
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG Q :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in Q."
} elseif {[onchan "L" $chan]} { 
if {[string match -nocase "* You're not the owner or a master of *" $text]} {return}
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG L :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in L"
	}
}
It just ignores the string thing :\
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

You didnt read my first post clearly.
(You need a new bind and a new procedure for the script!)
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Well i had made one, but for some reason it didnt work properly, here is the entire script

Code: Select all

proc addop:q:reaction {nick host hand text [censored]} {
  set chan $::addopchan
  set from "$nick!$host"
  if {[string match -nocase "Q!TheQBot@CServe.quakenet.org" $from]} {
    if {[string match -nocase "You are not known or banned on this channel and can't dump the userlist!" $text]} {
      putserv "PRIVMSG $chan :I have no access to Q on this channel."
      unbind notc - * addop:q:reaction
      return
    }
    if {[string match -nocase "You have to be master to change someone's flags!" $text]}	{
      putserv "PRIVMSG $:addopchan :I do not have the master flag for $chan"
      unbind notc - * addop:q:reaction
      return
    }
    if {[string match -nocase "You have to be owner to change a master's flags!" $text]}	{
      putserv "PRIVMSG $chan :I do not have the owner flag for $::addopchan"
      unbind notc - * addop:q:reaction
      return
    }
      unbind notc - * addop:q:reaction
	}
}

proc addop:l:reaction {nick host hand text [censored]} {
  set chan $::addopchan2
  set from "$nick!$host"
  if {[string match -nocase "L" $from]} {
    if {[string match -nocase "Sorry, you do not have permission to view/change user flags on" $text]} {
      putserv "PRIVMSG $chan :I have no access to L on this channel."
      unbind notc - * addop:l:reaction
      return
    }
    if {[string match -nocase "You're not the owner or a master of" $text]}	{
      putserv "PRIVMSG $chan :I do not have the master flag for $chan"
      unbind notc - * addop:l:reaction
      return
    }
    if {[string match -nocase "Only owners can change a master's flags." $text]}	{
      putserv "PRIVMSG $chan :I do not have the owner flag for $::addopchan"
      unbind notc - * addop:l:reaction
      return
    }
      unbind notc - * addop:l:reaction
	}
}

bind pub o|o !addop pub:addop:q

proc pub:addop:q {nick uhost hand chan text} { 
if {[string length $text] > 0} { set tnick [lindex $text 0] }
if {[onchan "Q" $chan]} { 
set ::addopchan "$chan"
bind notc - * addop:q:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG Q :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in Q."
} elseif {[onchan "L" $chan]} { 
set ::addopchan2 "$chan"
bind notc - * addop:l:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG L :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in L"
	}
}

bind pub o|o !rop pub:rop:q

proc pub:rop:q {nick uhost hand chan text} { 
if {[string length $text] > 0} { set tnick [lindex $text 0] }
if {[onchan "Q" $chan]} { 
set ::addopchan "$chan"
bind notc - * addop:q:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG Q :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan -o $tnick"
putquick "NOTICE $tnick :You have been removed from Q by $nick."
} elseif {[onchan "L" $chan]} { 
set ::addopchan2 "$chan"
bind notc - * addop:l:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG L :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan -o $tnick"
putquick "NOTICE $tnick :You have been removed from L by $nick."
	}
}
putlog "add Q\L flags script by MeTroiD loaded."
I made this 2 days ago but the L part never worked :(
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Try adding putlog and the end of each line in your procedure
which you want to check where the error is.
Like "putlog 1", etc etc. after every line in the procedure.

Code: Select all

set bla bla "varname"; putlog 0
if {(...............)} {; putlog 1
elseif {(...........)} {; putlog 2
else {(...............)} {; putlog "checking"
Then try to execute the command, and while doing so
check in dcc partyline with the bot, upto where the putlogs
have been displayed. The line which doesnt have it being
displayed might be the one which needs to be corrected, eventually
if there is an error detected in that line, the script will not run
further and the putlogs in the next few lines after it will also not
be displayed.

This is a good way of detecting faulty errors, which aren't
shown as Tcl error [proc:name] in partyline.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked